Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentOutOfRangeException: Index and count must refer to a location within the string. #28

Open
StinkySteak opened this issue Dec 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@StinkySteak
Copy link

ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count System.String.Remove (System.Int32 startIndex, System.Int32 count) (at <88e4733ac7bc4ae1b496735e6b83bbd3>:0) JSAM.JSAMEditor.JSAMEditorHelper.GenerateFolderStructureAt (System.String folderPath, System.Boolean ask) (at Library/PackageCache/com.brogrammist.jsam@89243ec951/Editor/JSAMEditorHelper.cs:196) JSAM.JSAMEditor.JSAMEditorHelper.CreateAssetSafe (UnityEngine.Object asset, System.String path) (at Library/PackageCache/com.brogrammist.jsam@89243ec951/Editor/JSAMEditorHelper.cs:144) JSAM.JSAMEditor.JSAMAudioFileWizardEditor.GenerateAudioFileObjects[T] (UnityEditor.Presets.Preset preset) (at Library/PackageCache/com.brogrammist.jsam@89243ec951/Editor/JSAMAudioFileWizard.cs:283) JSAM.JSAMEditor.JSAMAudioFileWizardEditor.OnGUI () (at Library/PackageCache/com.brogrammist.jsam@89243ec951/Editor/JSAMAudioFileWizard.cs:211) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <57a8ad0d1492436d8cfee9ba8e6618f8>:0) UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <57a8ad0d1492436d8cfee9ba8e6618f8>:0) UnityEditor.DockArea.OldOnGUI () (at <57a8ad0d1492436d8cfee9ba8e6618f8>:0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.OpenGate () (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <c42523c5e6f741739559ce608c30429a>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <ff6b5db041e141f9a771d6b39c070602>:0)

Before reporting the error, I really grateful JSAM exist, have used it on several projects, love the simplicty!
Thank you Jacky, hopefully JSAM will be larger in the future

@StinkySteak
Copy link
Author

This happens when output folder is empty on the wizard, maybe put a checker and throw expected error instead?

@StinkySteak
Copy link
Author

Also, I dont know how to handle this but, when generating our audio to a new created directory using the explorer, it would fail because the metafile is not generated by unity yet

@StinkySteak
Copy link
Author

Bug Description

Steps to Reproduce

  • Go to Audio File WIzard
  • Add SFX
  • Do not Set Output Folder
  • "Generate Audio File Objects"

Unity Versions Tested With
2021.3.21f1

@jackyyang09
Copy link
Owner

Thanks for reporting, this bug will be fixed in the next release.

And thank you for the comment, I'm glad you find it useful!

@jackyyang09 jackyyang09 added the bug Something isn't working label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants