private void DiscardReferenceValue() { if (RefValue != null) { RefValue.RemoveReference(this); RefValue = null; } }
public void Load(string Path) { this.Path = Path; if (!Path.Equals("") && ParentValue != null) { DiscardReferenceValue(); Value = AssetManager.Load <TextureCube>(Path); if (Value == null) { RefValue = ParentValue.Parent.GetParent().getTextureCube(Path); if (RefValue == null) { RefValue = ParentValue.Parent.ParentLevel.getTextureCube(Path); } if (RefValue != null) { RefValue.AddReference(this); } } } }