Hey
I wrote a ts-script and sometimes (but not always) in the cs-codegen version of this script appears a line (it replaces another line), which is causing errors.
Instead of…
public UnityEngine.EventSystems.PointerEventData @onPointerClick;
this line appears and is causing errors:
public UnityEngine.Vector4UnityEngine.EventSystems.PointerEventData @onPointerClick;
When I revert this change, everything is working fine, till this line appears again next day, or if somebody else opens the project
Hello there – we have an experimental AI bot that might be able to help you with your question. Would you like to try this out?
How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.
It looks like the TS to C# Component Compiler is not correctly resolving the type for onPointerClick. The issue arises from TypeScript to C# translation where the compiler mistakenly combines Vector4 with PointerEventData into an invalid type.
To fix this, I recommend explicitly annotating the type by adding a comment at the top of the class. This instructs the compiler on the correct type to use.
Adding the //@type comment should help the compiler correctly resolve the type for onPointerClick. If the problem persists, check for any updates to Needle Engine or contact the Needle Engine support for further assistance.