Example #1
0
 /// <summary>
 /// Called when a property is removed.
 /// </summary>
 /// <param name="prop">The property.</param>
 public override void OnRemoved(Property prop)
 {
     base.OnRemoved(prop);
     if (prop == Renderer)
     {
         Renderer = null;
     }
 }
Example #2
0
 /// <summary>
 /// Called when a property is added.
 /// </summary>
 /// <param name="prop">The property.</param>
 public override void OnAdded(Property prop)
 {
     base.OnAdded(prop);
     if (Renderer == null && prop is EntityRenderableProperty rnd)
     {
         Renderer = rnd;
     }
 }