コード例 #1
0
ファイル: AssetInfo.cs プロジェクト: mrcece/MotionFramework
 internal AssetInfo(string error)
 {
     _patchAsset = null;
     AssetType   = null;
     AssetPath   = string.Empty;
     Error       = error;
 }
コード例 #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);
            }
        }
コード例 #3
0
ファイル: AssetInfo.cs プロジェクト: mrcece/MotionFramework
        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;
        }