/// <summary> /// Destroy the given asset hologram, performing all necessary cleanup tasks. /// </summary> /// <param name="asset"></param> public static void DestroyAssetHologram(GameAssetContainer asset) { // Delete stuff // Call Destroy method on asset data asset.Data.Destroy(); // Destroy the game object Destroy(asset.GameObject); // Null the reference so it f***s RIGHT off entirely (precaution) asset.GameObject = null; // Null the data so it also dies asset.Data = null; }
/// <summary> /// Destroy the given asset, performing all necessary cleanup tasks. /// </summary> /// <param name="asset"></param> public static void DestroyAsset(GameAssetContainer asset) { // Delete stuff // Call Destroy method on asset data asset.Data.Destroy(); // Destroy the game object Destroy(asset.GameObject); // Null the reference so it f***s RIGHT off entirely (precaution) asset.GameObject = null; // De-register the asset GameManager.Instance.RemoveAssetFromDictionary(asset.Data.AssetID); // Null the data so it also dies asset.Data = null; }
public AssetCreatedEventArgs(GameAssetContainer assetContainer) { Container = assetContainer; }
public AssetCreatedEventArgs(GameAssetData data, GameAsset asset, GameObject gameObject) { Container = new GameAssetContainer(data, asset, gameObject); }