naverz / zepeto-studio-kor

48 stars 8 forks source link

[BUG]: 빌드시 System.Reflection.TargetInvocationException 에러 발생 #1220

Closed ryusiin closed 2 years ago

ryusiin commented 2 years ago

Please tell us the version of the ZEPETO World package. (You can check the version in Unity > Window > Package Manager.) 1.6.0

Please tell us which version of the ZEPETO app is currently installed. (You can check the version in ZEPETO App > MY > Settings > Version.) ex)

What features were you trying to implement? 물 셰이더를 적용한 것을 스마트폰에서 보려고 빌드하려고 했습니다.

What problem did you encounter? 빌드 자체가 안됩니다.

Please tell us your development environment. Window 11

Please attach the implemented code. If you have a screenshot, please attach it.

이하 에러 내용 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Asset '' is not a valid Asset or Scene. at UnityEditor.Build.Pipeline.BundleBuildContent..ctor (System.Collections.Generic.IEnumerable`1[T] bundleBuilds) [0x000ac] in C:\Users\SAMSUNG\Documents\GitHub\isityou_zepeto\Library\PackageCache\com.unity.scriptablebuildpipeline@1.15.2\Editor\Shared\BuildContent.cs:147 at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <695d1cc93cca45069c528c15c9fdd749>:0 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 at ZEPETO.Script.Build.BuildAssetBundleTask+ScriptableBuildPipelineCompatibility.CreateBundleBuildContent (UnityEditor.AssetBundleBuild[] builds) [0x00001] in <0f87b5f505714f16bc33125f8def98ba>:0 at ZEPETO.Script.Build.BuildAssetBundleTask.RunWithBuildPipeline (System.Reflection.Assembly sbpAssembly, UnityEditor.AssetBundleBuild sceneAssetBundle, UnityEditor.BuildTarget buildTarget) [0x00039] in <0f87b5f505714f16bc33125f8def98ba>:0 at ZEPETO.Script.Build.BuildAssetBundleTask.Run () [0x00109] in <0f87b5f505714f16bc33125f8def98ba>:0 at ZEPETO.Script.Build.ZepetoScriptBuildContext.Build () [0x000f0] in <0f87b5f505714f16bc33125f8def98ba>:0 UnityEngine.Debug:LogError (object) ZEPETO.Script.Build.ZepetoScriptBuildContext:Build () ZEPETO.Script.Build.ZepetoScriptBuildPipeline:Build (ZEPETO.Script.ZepetoScriptBuildManifest,ZEPETO.Script.ZepetoScriptBuildManifest/Platforms,ZEPETO.Script.Build.ZepetoScriptBuildTask[]) ZEPETO.World.Editor.WorldToolbar:PlayOnZepeto () ZEPETO.World.Editor.WorldToolbar:PlayOnZepeto (UnityEngine.GUIStyle) ZEPETO.Script.Build.ZepetoScriptToolbar:RenderToolbars (UnityEngine.Rect) ZEPETO.Script.Build.ZepetoScriptToolbar:OnGUI () UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

ryusiin commented 2 years ago

image

새로 삭제하고 다시 처음부터 클론 해보니 이번에는 Safe 모드 처리와 함께 위와 같은 에러가 나옵니다.

ryusiin commented 2 years ago

이후 시험해본 것입니다.

Zepeto-TechEvangelist commented 2 years ago

안녕하세요, 빌드에 사용하신 물 쉐이더를 어떤 방식으로 구현하셨는지 알려주시면 이슈 파악에 도움이 될 것 같습니다.

ryusiin commented 2 years ago

우선 해당 문제 해결은 했습니다:)

<해결> Assets 및 Packages 외 전부 제거 후 다시 프로젝트 구동

원인은 확실히 모르겠습니다만, 쉐이더 문제가 아니라 쉐이더를 만지면서 패키지를 정리할 때 문제가 생긴 듯 합니다.