Пример #1
0
        /// <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;
        }
Пример #2
0
 /// <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;
 }
Пример #3
0
 public AssetCreatedEventArgs(GameAssetContainer assetContainer)
 {
     Container = assetContainer;
 }
Пример #4
0
 public AssetCreatedEventArgs(GameAssetData data, GameAsset asset, GameObject gameObject)
 {
     Container = new GameAssetContainer(data, asset, gameObject);
 }