sassembla / Autoya

thin framework for Unity.
MIT License
224 stars 19 forks source link

AssetGraphTools MyPostProcess.cs may fail dependancy json file. #24

Closed neon-izm closed 6 years ago

neon-izm commented 6 years ago

https://github.com/sassembla/Autoya/blob/fe8da62be5fb8f37caf1830faf3830261ac0dd7c/Assets/Editor/AssetGraph-1.3-release/UnityEngine.AssetBundleGraph/Generated/Editor/MyPostprocess.cs#L116

例えば Assets\AutoyaTests\RuntimeData\AssetBundles\MainResources\textureName1.prefab

を main_assets.prefab にrenameすると、ファイルコピーに失敗して依存関係を記したjsonファイルが出力されないです。

注意書きを書いておくとか、こういう検出をすると安全そうです。

                  int count = Regex.Split(destPath, fileName).Length;
                    if (count > 1)
                    {
                        Debug.LogError("may cause error with name :" + fileName+" assetpath:"+currentPath);
                    }
sassembla commented 6 years ago

Good point! I'll check for it. Thank you for report!

neon-izm commented 6 years ago

thaks for rapid feedback!

sassembla commented 6 years ago

I've fixed that error cause in 190a23ce1b89b4fb867891ac77764ede7a7bf3ea.

you can now generate same-name AssetBundle and AssetBundleList. but need to avoid using ".json" extension to AssetBundle name.

and error will raise if you use a.json as AssetBundle name with AssetBundleList "a".