public void Unload() { //Debug.Log("Unload: " + this.componentResource.GetId() + " :: " + this.componentResource.assetPath); WindowSystemResources.UnloadResource_INTERNAL(this.GetReference(), this.componentResource); if (this.root != null) { this.root.OnWindowUnload(); } this.instance = null; this.root = null; this.window = null; /*if (this.componentResource.loadableResource == true) { * * this.componentResource.Unload(); * * } else { * * // Resource was not load via Resources.Load(), so it can't be unload properly * * }*/ }
public void Unload() { for (int i = 0; i < this.components.Length; ++i) { this.components[i].Unload(); } WindowSystemResources.UnloadResource_INTERNAL(this.GetReference(), this.layoutResource); this.window = null; }