public virtual void AfterDeserialization() { try { if (this.parentID == uint.MaxValue) { this.Parent = null; } else { this.Parent = findByID(this.parentID); } this.World = World.Find(this.worldName); this.RenderLayer = Layer.Find(this.renderLayerName); } catch (Exception e) { Log.Exception(e); } }
/// <summary> /// Sets parent of an object /// </summary> /// <param name="obj">parent</param> public void SetParent(RenderableObject obj) { this.Parent = obj; }