#Roslyn Generate Monobehavior
1 messages · Page 1 of 1 (latest)
We have our own roslyn sourceGen solution. But can't managed to do the same. Now we have to declare another partial class for it in order for unity's AddComponent to pick it up.
LIke this:
SelectiveComponentDataAuthoring that it inherits from is just a regular monobehavor abstract class.
unity creates a hidden cs file with structName_Authoring.cs
GenerateAuthoringComponent is deprecated. do you want to get the functionality back in 1.0?
source is btw available in com.unity.entities@0.51.1-preview.21\Unity.Entities\SourceGenerators\Source~\AuthoringComponent
I suppose you are talking about the one in my second screenshot from the top right?
probably gonna stay on 0.51 for a while til 1.0 is stable
This one?
I don't know what that's supposed to be. These are the sourcegen files for GenerateAuthoringComponent. Why do you need that when you're still on 0.51? the attribute just creates the file you linked in the 2nd screenshot. standard monobehaviour and the file name is the same as the class name so you can add it as component. that's pretty much it