Hello, using following code in Unity2019.1.0b9 with Timeline and markers crashes Unity.
public class MarkerReceiver : MonoBehaviour, INotificationReceiver
{
public void OnNotify( Playable origin, INotification note, object context )
{
Contexts.sharedInstance.game.CreateEntity();
}
}
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object:set_hideFlags (UnityEngine.HideFlags)
at Entitas.VisualDebugging.Unity.EntityBehaviour.Init (IContext context, IEntity entity, System.Collections.Generic.Stack`1 entityBehaviourPool) [0x00000] in <filename unknown>:0
at Entitas.VisualDebugging.Unity.ContextObserver.onEntityCreated (IContext context, IEntity entity) [0x00000] in <filename unknown>:0
at (wrapper delegate-invoke) Entitas.ContextEntityChanged:invoke_void__this___IContext_IEntity (Entitas.IContext,Entitas.IEntity)
at Entitas.Context`1[TEntity].CreateEntity () [0x00000] in <filename unknown>:0
Using Coroutines and delaying context.createEntity() till next frame removes crash.
Is this a bug or can someone please explain what's wrong with this code?
Hello, using following code in Unity2019.1.0b9 with Timeline and markers crashes Unity.
Using Coroutines and delaying
context.createEntity()
till next frame removes crash. Is this a bug or can someone please explain what's wrong with this code?