示例#1
0
 void AssetModifyInterface.SetContent <AssetContentType>(
     AssetContentSettingParam <AssetContentType> settingParam,
     AssetInResultListener <AssetContentType> listener)
 {
     if (string.IsNullOrEmpty(settingParam.contentPath))
     {
         if ((typeof(MainContentType) == typeof(AssetContentType)))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <AssetContentType> {
                 content     = settingParam.content,
                 contentPath = parent.mainAssetName,
                 doOverwrite = settingParam.doOverwrite
             }, listener);
         }
         else
         {
             listener.OnFail();
         }
     }
     else
     {
         basicAssetIO.assetIn.SetContent(new BasicAssetInParam <AssetContentType> {
             content     = settingParam.content,
             contentPath = settingParam.contentPath,
             doOverwrite = settingParam.doOverwrite
         }, listener);
     }
 }
示例#2
0
 void AssetModifyInterface.SetContent <ContentType>(AssetContentSettingParam <ContentType> setParam, AssetInResultListener <ContentType> listener)
 {
     if (string.IsNullOrEmpty(setParam.contentPath))
     {
         if ((typeof(MonoBAUICustomizer) == typeof(ContentType)))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
                 content     = setParam.content,
                 contentPath = "Customizer.prefab",
                 doOverwrite = setParam.doOverwrite
             }, listener);
         }
         else if ((typeof(MonoBAUIntegrator) == typeof(ContentType)))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
                 content     = setParam.content,
                 contentPath = "Integrator.prefab",
                 doOverwrite = setParam.doOverwrite
             }, listener);
         }
         else
         {
             listener.OnFail();
         }
     }
     else
     {
         basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
             content     = setParam.content,
             contentPath = setParam.contentPath,
             doOverwrite = setParam.doOverwrite
         }, listener);
     }
 }
示例#3
0
 void AssetModifyInterface.SetContent <ContentType>(
     AssetContentSettingParam <ContentType> setParam,
     AssetInResultListener <ContentType> listener
     )
 {
     if (obtainedInterface != null)
     {
         obtainedInterface.modifier.SetContent(setParam, listener);
     }
     else
     {
         tasks.Add(() => {
             obtainedInterface.modifier.SetContent(setParam, listener);
         }
                   );
     }
 }
示例#4
0
 void AssetModifyInterface.SetContent <AssetContentType>(
     AssetContentSettingParam <AssetContentType> settingParam,
     AssetInResultListener <AssetContentType> listener)
 {
     if (string.IsNullOrEmpty(settingParam.contentPath))
     {
         if (typeof(BaseMonoBType).IsAssignableFrom(settingParam.content.GetType()))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <GameObject> {
                 content     = (settingParam.content as MonoBehaviour).gameObject,
                 contentPath = parent.mainAssetName,
                 doOverwrite = settingParam.doOverwrite
             }, new StubAssetInResultListener <GameObject>());
         }
         else if (typeof(GameObject).IsAssignableFrom(settingParam.content.GetType()))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <GameObject> {
                 content     = settingParam.content as GameObject,
                 contentPath = parent.mainAssetName,
                 doOverwrite = settingParam.doOverwrite
             }, new StubAssetInResultListener <GameObject>());
         }
         else if (typeof(AssetContentType) == typeof(GameObject))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <AssetContentType> {
                 content     = settingParam.content,
                 contentPath = parent.mainAssetName,
                 doOverwrite = settingParam.doOverwrite
             }, listener);
         }
         else
         {
             listener.OnFail();
         }
     }
     else
     {
         basicAssetIO.assetIn.SetContent(new BasicAssetInParam <AssetContentType> {
             content     = settingParam.content,
             contentPath = settingParam.contentPath,
             doOverwrite = settingParam.doOverwrite
         }, listener);
     }
 }
示例#5
0
 void AssetModifyInterface.SetContent <ContentType>(AssetContentSettingParam <ContentType> setParam, AssetInResultListener <ContentType> listener)
 {
     if (string.IsNullOrEmpty(setParam.contentPath))
     {
         if ((typeof(MainContentBaseType) == typeof(ContentType)))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
                 content     = setParam.content,
                 contentPath = "Main.json",
                 doOverwrite = setParam.doOverwrite
             }, listener);
         }
         else if (typeof(MainContentType) == typeof(ContentType))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
                 content     = setParam.content,
                 contentPath = "Main.json",
                 doOverwrite = setParam.doOverwrite
             }, listener);
         }
         else if (typeof(byte[]) == typeof(ContentType))
         {
             basicAssetIO.assetIn.SetContent(new BasicAssetInParam <MainContentType> {
                 content     = RequiredFuncs.FromJson <MainContentType>(Encoding.UTF8.GetString((byte[])(object)setParam.content)),
                 contentPath = "Main.json",
                 doOverwrite = setParam.doOverwrite
             }, new StubAssetInResultListener <MainContentType>());
         }
     }
     else
     {
         basicAssetIO.assetIn.SetContent(new BasicAssetInParam <ContentType> {
             content     = setParam.content,
             contentPath = setParam.contentPath,
             doOverwrite = setParam.doOverwrite
         }, listener);
     }
 }
示例#6
0
 void AssetModifyInterface.SetContent <ContentType>(AssetContentSettingParam <ContentType> setParam, AssetInResultListener <ContentType> listener)
 {
     //stub
     listener.OnFail();
 }
示例#7
0
 void AssetModifyInterface.SetContent <ContentType>(AssetContentSettingParam <ContentType> setParam, AssetInResultListener <ContentType> listener)
 {
     //controversial: is it really OK to just setting content to both?
     local.modifier.SetContent(setParam, listener);
     remote.modifier.SetContent(setParam, listener);
 }