Example #1
0
 internal AssetInfo(string error)
 {
     _patchAsset = null;
     AssetType   = null;
     AssetPath   = string.Empty;
     Error       = error;
 }
Example #2
0
        private static AssetInfo ConvertLocationToAssetInfo(string location, System.Type assetType)
        {
            DebugCheckLocation(location);
            string     assetPath  = _locationServices.ConvertLocationToAssetPath(location);
            PatchAsset patchAsset = _bundleServices.TryGetPatchAsset(assetPath);

            if (patchAsset != null)
            {
                AssetInfo assetInfo = new AssetInfo(patchAsset, assetType);
                return(assetInfo);
            }
            else
            {
                string error;
                if (string.IsNullOrEmpty(location))
                {
                    error = $"The location is null or empty !";
                }
                else
                {
                    error = $"The location is invalid : {location}";
                }
                YooLogger.Error(error);
                AssetInfo assetInfo = new AssetInfo(error);
                return(assetInfo);
            }
        }
Example #3
0
        internal AssetInfo(PatchAsset patchAsset)
        {
            if (patchAsset == null)
            {
                throw new System.Exception("Should never get here !");
            }

            _patchAsset = patchAsset;
            AssetType   = null;
            AssetPath   = patchAsset.AssetPath;
            Error       = string.Empty;
        }