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

Remove the "requirement" of git #4

Open
brmassa opened this issue Feb 17, 2025 · 4 comments
Open

Remove the "requirement" of git #4

brmassa opened this issue Feb 17, 2025 · 4 comments

Comments

@brmassa
Copy link

brmassa commented Feb 17, 2025

Git should be an optional feature.

How to reproduce:

  • create an empty project
  • add OpenUPM URL and scope
  • open the Build+ window
  • click save
ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <968dbf724b484960adb704ddfc350bd1>:0)
Trismegistus.BuildPlus.Git.GitTools.RunGitCommand (System.String command) (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/Git/GitTools.cs:96)
Trismegistus.BuildPlus.Git.GitTools.GetRemote () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/Git/GitTools.cs:18)
Trismegistus.BuildPlus.StandardGitParameters.Remote () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/Git/StandardGitParameters.cs:17)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <968dbf724b484960adb704ddfc350bd1>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <968dbf724b484960adb704ddfc350bd1>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <968dbf724b484960adb704ddfc350bd1>:0)
Trismegistus.BuildPlus.BuildPathAttribute.CallAllMethods () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/BuildPathAttribute.cs:22)
Trismegistus.BuildPlus.BuildPlusEditor.UpdateDict () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/BuildPlusEditor.cs:789)
Trismegistus.BuildPlus.BuildPlusEditor.Save () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/BuildPlusEditor.cs:157)
Trismegistus.BuildPlus.BuildPlusEditor.OnGUI () (at ./Library/PackageCache/trismegistus.unity.buildplus@d88db4e809c6/Editor/BuildPlusEditor.cs:698)
UnityEditor.HostView.OldOnGUI () (at /home/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:317)
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 /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:429)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:718)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:690)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:683)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:643)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:632)
UnityEngine.UIElements.IMGUIContainer.HandleEventBubbleUp (UnityEngine.UIElements.EventBase evt) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:782)
UnityEngine.UIElements.CallbackEventHandler.HandleEventBubbleUpInternal (UnityEngine.UIElements.EventBase evt) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventHandler.cs:283)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpHandleEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element, System.Boolean disabled) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:409)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpAllDefaultActions (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element, System.Boolean disabled, System.Boolean isCapturingTarget) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:422)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:301)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:57)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElement (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:616)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:578)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/PointerEvents.cs:1186)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:415)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:215)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:590)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:513)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:232)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:76)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /home/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:30)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)

@brmassa
Copy link
Author

brmassa commented Feb 17, 2025

[different issue]: Also, it's complaining about SmartFormat variables (like {p_path}) in a clean installation.

@Hermesiss
Copy link
Owner

Sorry, it didn't even occur to me that Unity could be used without git 😅

@brmassa
Copy link
Author

brmassa commented Feb 18, 2025

me too... :P

My case is: I'm creating a new UPM plugin, but I've set the git root as the Asset/MyPlugin folder, not the project root.

@Hermesiss
Copy link
Owner

@brmassa please try the update
and btw you can use subpath if you are adding the package via git url like this:
https://github.com/Hermesiss/unity-buildplus.git?path=/Packages/trismegistus.unity.buildplus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants