Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

SnazzyTools : SnazzyGrid - much more than just a grid!

Discussion in 'Assets and Asset Store' started by Becoming, Jun 25, 2014.

  1. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Well, yes the important part is Mathf.Abs in the test line.
     
  2. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Not sure I made a good explanation here. I believe you're right and it is the correct behaviour, but it makes "organic" rotations of children quite hard (in this example I'm trying to rotate a rock child of another one) as the rotation solver on children is doing really wild things. Did you try with a parent having an uncommon rotation ?

    If I unparent the rock everything is okay, a little rotation on the X axis give the following result
    upload_2017-11-15_16-41-12.png


    But as a child, when trying to move the same way on the X axis then each time I move only a little bit the values get all very weird either in local or global space.
    Parent rotation :
    upload_2017-11-15_16-45-10.png

    Eg. Child rotation from local:
    upload_2017-11-15_16-42-32.png

    Eg .Child rotation from global:
    upload_2017-11-15_16-43-14.png
     
    Last edited: Nov 15, 2017
  3. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    I don't know, feels like a bug though. I tried to snap several time in a row the same child object without touching it and the rotations values change each time on their own. I really feels like there is an issue of trying to solve a child rotation to the grid when it's not possible. Do I explain it well enough or my report is unclear?

    How do you handle this usually? Does it tries to find the closest rotation?For now it looks pretty confused and can't find a pattern on the issue.

    Several midle-click on snap in a row without touching the child object:
    upload_2017-11-15_16-58-35.png

    upload_2017-11-15_16-56-28.png

    upload_2017-11-15_16-56-58.png
     

    Attached Files:

  4. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Hmm, thanks for the detailed explanation, i am not sure yet to be honest. Do the child objects also look wrong in their rotation or is the issue purely in the values? I am asking this because i suspect that there might be some gimbal lock happening. In general what SnazzyGrid tries to do is to snap each euler angle component individually to the closest valid angle, in Unity's default rotation order.

    What is the setup in the hierarchy that you have, i am wondering why you'd have such odd rotations on the parent. I will try to find what is causing this and if there is a solution that does not run in a gimbal lock(if this is even the case). Maybe the rotation could be solved with quaternions although the math for snapping in quaternions might be bit tricky.
     
  5. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Ah, yes, i overlooked the Mathf.Abs... Thanks, i will incorporate it in the next update. Also, big thanks for the nice review ;)
     
  6. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Thanks for taking time,
    The parent asset is an asteroid so rotation might be anything. And indeed the visual rotation of the child is also going wild. It might be what you're talking aboutn don't know without having a look at the code.

    Now just a question: Is there a way to differentiate size increments to position/rotation? Because some assets are quite "big" thus increment is not grainy enough and even a 0.1 step is pretty arsh. What is the best way to handle this otherwise? Thanks.

    I'm also having this stacktrace when calling the settings pane, snazzy is in Assets/3rdParties/SnazyTools/SnazyGrid
    upload_2017-11-15_18-48-54.png
     
  7. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    About the size increment, size snapping is so rarely useful that i decided not to have a separate increment, what i would suggest is to use the secondary increment as it allows you to quickly switch using a hotkey, then do the scale snapping in an extra step.

    The error with the settings window that you get is something pretty uncommon, I had it once when moving SnazzyGrid to another folder in the project while the settings window was open(if i recall correctly). I think it was fixed when closing all SnazzyGrid windows and resetting the layout(and maybe restart unity). When you open the windows again, this error should not occur anymore. I am not 100% sure, as it happened to me only once. If you keep getting this error please let me know.
     
  8. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    twobob likes this.
  9. mgmhunt

    mgmhunt

    Joined:
    Apr 1, 2013
    Posts:
    61
    Snazzy Grid is stopping my builds

    "Could not extract GUID in text file Assets/Plugins/SnazzyTools/SnazzyGrid/Sources/SnazzySettings.prefab at line 49."

    The provided Show All Hidden objects button shows me the prefab

    ##SnazzyGrid##(Clone) which if I delete, the build works.

    Kinda annoying cos it auto-adds itself to every scene as well. I like to keep my Scene files -clean- :)

    Also it explains to me why I can see the Snazzy Grid in Play mode. Maybe useful (?!) in Editor Mode to have it in Scene and Game views.... But I don't really want to have to manually turn off the grid when playing. Can you add a setting? unless I've missed something.

    ---

    Oh and looking up a few posts, I notice the Settings issue, which I've also encountered. Had to close Snazzy window and reopen it again. Don't think I moved from default install folder, I tend to leave all asset installs alone and work in my own little corner, just for that reason that some assets seem a bit fragile.
     
  10. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    The prefab should actually have the "EditorOnly" tag set, i'll reinvestigate. Thanks for the report!
     
  11. mgmhunt

    mgmhunt

    Joined:
    Apr 1, 2013
    Posts:
    61
    Tag is set for both the ##SnazzyGrid## and SnazzySettings. Just tried removing and reopening Snazzy Window, which added prefab to scene (hidden). And Build worked... !

    So something fell over in the background with prefab, not consistent bug I guess.
     
  12. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Hi there,

    I am running into an issue while trying to build where FindHiddenObjects is preventing my build from completing because it references UnityEditor. I believe there is a way to surround the using declaration with an #if UNITY_EDITOR to keep it from being included in the build. I hate editing asset code if I can help it though, makes keeping up to date much harder.

    Do you have a different fix I can use to allow my game to build? Should I just add the #if UNITY_EDITOR myself?

    TIA,
    Boysenberry
     
  13. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    can't build when I use your asset. Very useful, but for testing a multiplayer game I have to build regularly. Any workaround? Getting errors regarding UnityEditor and EditorWindow not being found when I build.
     
  14. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    well, you should be getting rid of this asset anyways, when you build or release your game as it makes your file size larger...and its NOT needed. Unless your using it for something for RUNTIME or something.

    PS the devs have been inactive, they are working on a game, I suggest to email him if you need to know more. But I been using this tool for years, I no longer do. Since I moved to Octave 3d.But he does come around from time to time.
     
  15. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Ah good to know. Yeah it wouldn't be an issue, but being I'm building every 10 minutes for multiplayer testing it's just kind of a pain. I own octave, maybe I'll give that a shot. Does it have the quick parent capability? That's primarily what I use snazzy for
     
  16. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Yes. it does. but i'm surprised your having a building issue, with Snazzy , I have not used in for ever, I also make multi player games, but its been a few years since I used Snazzy all the time.. maybe try importing it, if you keep having issues. if not use Octave. I hate to do that on another forums...But if your having issues, and your not getting help, not much else you can do.. good luck.
     
  17. lazarus-liew

    lazarus-liew

    Joined:
    Feb 15, 2014
    Posts:
    12
    i had compile error when i trying to compile the build.

    i was try to import asset again. but still same. is that any way to solve? thanks.
    -----------------------------------------------------------------------------------------------
    version 2018.2.2f1

    Assets/Plugins/SnazzyTools/SnazzyGrid/Scripts/FindHiddenObjects.cs(8,38): error CS0246: The type or namespace name `EditorWindow' could not be found. Are you missing an assembly reference?

    Error building Player because scripts had compiler errors

    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

    -------------------------------------------------------------------------------------------------
     
    Last edited: Aug 15, 2018
  18. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    You don't say in what version of unity. could be a reference error in the newer ones maybe it needs a specific assemdef to only build in the editor? Total guess?

    TBH I cut it down to like one file one time and have never looked back. I just use that one.
     
  19. lazarus-liew

    lazarus-liew

    Joined:
    Feb 15, 2014
    Posts:
    12
    thanks for help. i was write the unity version in the post.
     
  20. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Oh yeah I see it now.

    Okay so 2018 I would say yes it needs an assemdef and some love

    EDIT: Or just do what I say below
     
    Last edited: Aug 19, 2018
  21. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    Okay so I looked.
    "Assets/Plugins/SnazzyTools/SnazzyGrid/Scripts/FindHiddenObjects.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing an assembly reference?"

    That one?

    Move FindHiddenObjects.cs into the folder called "Editor" and try again?
     
    hopeful likes this.
  22. lazarus-liew

    lazarus-liew

    Joined:
    Feb 15, 2014
    Posts:
    12
    Hi, thanks for helping. it solved. thanks.
     
    twobob likes this.
  23. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505
    Hi I'm on 2019.3 and the plugin does not work anymore, maybe due to the way prefabs are handled.

    Code (CSharp):
    1. You are trying to replace or create a Prefab from the instance '##SnazzyGrid##' that contains the script 'SnazzyScene', which does not derive from MonoBehaviour. This is not allowed.
    2. Please change the script to derive from MonoBehaviour or remove it from the GameObject.
    3.  
    This is then followed by some NullReferenceExceptions
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. SnazzyToolsEditor.GetOldPSR () (at Assets/SnazzyTools/SnazzyGrid/Editor/SnazzyToolsEditor.cs:1055)
    3. SnazzyToolsEditor.OnEnable () (at Assets/SnazzyTools/SnazzyGrid/Editor/SnazzyToolsEditor.cs:98)
    4. UnityEditor.EditorWindow:GetWindow(Type)
    5. SnazzyToolsEditor:Init() (at Assets/SnazzyTools/SnazzyGrid/Editor/SnazzyToolsEditor.cs:78)
    6.  
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. SnazzyToolsEditor.OnInspectorUpdate () (at Assets/SnazzyTools/SnazzyGrid/Editor/SnazzyToolsEditor.cs:2314)
    3. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    7. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <cdd38c6cb7c446c6ac90945c7521da61>:0)
    8. UnityEditor.HostView.Invoke (System.String methodName) (at <cdd38c6cb7c446c6ac90945c7521da61>:0)
    9. UnityEditor.HostView.OnInspectorUpdate () (at <cdd38c6cb7c446c6ac90945c7521da61>:0)
    10.  
    etc..

    Thanks for your help
     
  24. Jon_Brant

    Jon_Brant

    Joined:
    Mar 22, 2018
    Posts:
    56
    So, looks like this project is dead? Was looking to buy it :(
     
  25. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Last update is 2.4 years ago. The developer does not want to spend time into this asset because it's not worth to him perhaps of the low selling rate.

    The asset store need new rules. Assets are not updated for the last 2 years should be automatically marked as free for 4 weeks, and so on until it's works again.

    But the shareholder is happy if you buy, anyway if it's working or not.
     
  26. Jon_Brant

    Jon_Brant

    Joined:
    Mar 22, 2018
    Posts:
    56
    Yeah, I feel like it should at least warn you. I've bought several assets only to find out they're dead and useless
     
  27. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Dead and leaves errors hanging around when it's removed, yuck. Seemed like it would be good, looks can be deceiving...
     
  28. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,020
    It's been updated today. Not tested yet but nice to see an update. Great to see it's still alive.
     
  29. UndyingSpite

    UndyingSpite

    Joined:
    Dec 25, 2013
    Posts:
    7
    Any plans on supporting Vertices, Faces (ProBuilder)? Atm, I have to use both, ProGrids and Snazzy.