Codegen cannot derive from sealed type

Placing this file in src>scripts gives the error Assets\Needle\Components.codegen\ARRenderer.cs(8,36): error CS0509: 'ARRenderer': cannot derive from sealed type 'EventDispatcher'

Is this something I can fix myself or have I found a codegen issue?

Original Post on Discord

by user 103054507105067008

You can annotate the class with //@type UnityEngine.MonoBehaviour

That did the trick, thanks!

by user 103054507105067008

Do you actually want to have that as a component in Unity? Thought the goal was to just reference it from other files, right? In this case you can annotate it with //@dont-generate-component

See Needle Engine Scripting | Needle Engine Documentation

I probably don’t but honestly had no idea what I was doing

by user 103054507105067008

I just want to make some drag/scale/rotate actions for AR :sweat_smile:

by user 103054507105067008