コード例 #1
0
        /// <summary>
        /// Adds asset to list of loaded assets.
        /// </summary>
        public UnityAsset AddAsset(string path, UnityEngine.Object asset)
        {
            if (!AssetDictionary.ContainsKey(path))
            {
                var unityAsset = new UnityAsset(path, asset);
                AssetDictionary.Add(unityAsset);
                return(unityAsset);
            }

            return(AssetDictionary[path]);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public SpriteAsset(UnityAsset unityAsset)
 {
     UnityAsset = unityAsset;
 }