alttester / alttester/AltTester-Unity-SDK

AltTester ComponentNotFoundException when calling component method with IL2CPP (works with Mono)

Đang mở
#1,922 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
C#
Star
121
Fork
24
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

When building with IL2CPP and calling a method in the following way:
```
self.controller = alt_driver.find_object(By.NAME, "FrameController")
self.controller.call_component_method(
"FrameController",
"MarkActionsExecuted",
assembly="Assembly-CSharp"
)

```
the AltTester client throws the following error (this is from my Python backend using AltTester):
```
alttester.exceptions.ComponentNotFoundException:
Exception of type 'AltTester.AltTesterSDK.Driver.ComponentNotFoundException' was thrown

```

I’ve verified that when building with Mono, this error does not occur, and my backend is able to successfully trigger the method. However, with IL2CPP, this error appears. This happens for both Android and macOS builds.

I have already added [Preserve] attributes in my Unity scripts and also included preserve rules in link.xml, but I’m still not sure why this error is occurring.

Interestingly, when I call the method inside FrameController during Start(), MarkActionsExecuted is invoked successfully. This makes me think the method is not being stripped, but I’m not certain.

Can anyone help me understand and resolve this issue?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.