Questions about SubScene workflow


I have set name and buffer in Conver function. But it doesn’t have name or those buffers in Entity Debugger after closed the subscene or in play mode.

(Note: the other components added in Convert() are truly added)

After several tests, I realized it’s maybe because the subscene binary doesn’t automatically “refresh” after I changed code in Convert(). I tried Edit and Close, and Unload and Load the subscene. it’s still not refreshing it. So how to force the subscene to refresh after changed the Convert code in IConvertGameObjectToEntity?

There is an attribute to do exactly that :slight_smile: Mark your AgentAuthoring class with ConverterVersion and update the version whenever you change your conversion logic. Doing this invalidates your saved version and will regenerate it.

See example here:
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/ECSSamples/Assets/Advanced/Boids/Scripts/BoidObstacleAuthoring.cs

1 Like

Thank you very much!

1 Like