0
Answered

Specialized math units like Per Second missing in Bolt 2

Daniel Robbins 2 years ago updated 7 months ago 8

In https://www.youtube.com/watch?v=6MWYzXu0GpI a "Per Second" unit is used but I can't find that in Bolt 2. Where is it? I am noticing this a bunch in Bolt 2 (vs. the Bolt 1 tutorials). Is there a general rule I can use to "translate" the names/locations of units that I can't find in Bolt 2?

In 

Other units that appear to be in different places (or missing) upon first inspection include "Camera/Get Main"

Thanks

Bolt Version:
Bolt 2
Unity Version:
2018.3.0f2
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2
Pending Review

Hi Daniel,

After updating Bolt 2, did you run a Full Extract? In between alpha versions, it is often necessary as we change the underlying structure of things.

+1

Sorry, just realized we obsoleted the Per Second unit in Alpha 3 due to an internal miscommunication. We'll be reinstating it in the next alpha. In the mean time, you can multiply your value by Time: Delta Time, which is precisely what the unit was doing behind the scenes.

Thanks for the help with "Per time".

How about other units like "Camera/Get Main"? Is there a changelog that lists deprecated unit?

Yes, I've done a full extract several times and I still can't find "common" units that are used in several of the Bolt 1.x tutorials. In the attached screenshot you can see a unit in Bolt 2 called "Camera/Main". If there are new naming conventions for units, that can help Bolt 1.x people use Bolt 2, please let us know. :-)

Is there any other info I can provide? I am happy to do a screenshare session.

NOTE: we are attempting to use Bolt for prototyping AR/VR experiences at HTC-Vive.



Any help is appreciated.

-----------

I did get the following messages when trying to run Unity and do a new extract:
Missing XML Documentation.

Extract with 'Tools > Bolt > Extractor'.
UnityEngine.Debug:LogWarning(Object)
Bolt.<>c:b__11_0(Task) (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:134)
Ludiq.Task:Run() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:68)
Ludiq.BackgroundTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/BackgroundTaskRunner.cs:44)
Ludiq.BackgroundTaskRunner:Run(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/BackgroundTaskRunner.cs:30)
Ludiq.Task:Run(String, Int32, Action`1) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:197)
Bolt.Extraction:Load() (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:120)
Bolt.Extraction:BackgroundWork() (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:29)
System.Reflection.MethodBase:Invoke(Object, Object[])
Ludiq.<>c__DisplayClass0_0:<.cctor>b__3() (at Assets/Ludiq/Ludiq.Core/Editor/Threading/BackgroundWorker.cs:49)
Ludiq.BackgroundWorker:Work() (at Assets/Ludiq/Ludiq.Core/Editor/Threading/BackgroundWorker.cs:115)
System.Threading.ThreadHelper:ThreadStart()

---------------

GetGfxDevice() should only be called from main thread
UnityEngine.Debug:LogException(Exception)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:67)
Ludiq.WindowTaskRunner:Run(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:44)
Ludiq.Task:Run(String, Int32, Action`1) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:197)
Bolt.XmlDocumentationExtractor:Extract(ExtractionConfiguration) (at Assets/Ludiq/Bolt.Core/Editor/Documentation/XmlDocumentationExtractor.cs:72)
Bolt.<>c__DisplayClass10_0:b__0(Task) (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:75)
Ludiq.Task:Run() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:68)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:61)
Ludiq.<>c__DisplayClass10_0:b__0() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:33)
System.Threading.ThreadHelper:ThreadStart()

---------------------

TimeoutException: Time-out exceeded on Unity API thread action delegate. Potential deadlock.
Ludiq.UnityAPI.Await (System.Action action, System.Nullable`1[T] timeout) (at Assets/Ludiq/Ludiq.Core/Editor/Utilities/UnityAPI.cs:124)
Ludiq.UnityAPI.Await (System.Action action) (at Assets/Ludiq/Ludiq.Core/Editor/Utilities/UnityAPI.cs:85)
Bolt.XmlDocumentationExtractor+<>c__DisplayClass11_0.b__0 (Ludiq.Task extraction) (at Assets/Ludiq/Bolt.Core/Editor/Documentation/XmlDocumentationExtractor.cs:80)
Ludiq.Task.Run () (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:68)
Ludiq.WindowTaskRunner.RunSynchronous (Ludiq.Task task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:61)
UnityEngine.Debug:LogException(Exception)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:67)
Ludiq.WindowTaskRunner:Run(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:44)
Ludiq.Task:Run(String, Int32, Action`1) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:197)
Bolt.XmlDocumentationExtractor:Extract(ExtractionConfiguration) (at Assets/Ludiq/Bolt.Core/Editor/Documentation/XmlDocumentationExtractor.cs:72)
Bolt.<>c__DisplayClass10_0:b__0(Task) (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:75)
Ludiq.Task:Run() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:68)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:61)
Ludiq.<>c__DisplayClass10_0:b__0() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:33)
System.Threading.ThreadHelper:ThreadStart()

-----------------

Unit options extraction succeeded.
46975 options available in the fuzzy finder.
UnityEngine.Debug:Log(Object)
Bolt.UnitOptionsExtractor:Extract(ExtractionConfiguration) (at Assets/Ludiq/Bolt.Flow/Editor/Options/UnitOptionsExtractor.cs:56)
Bolt.<>c__DisplayClass10_0:b__0(Task) (at Assets/Ludiq/Bolt.Core/Editor/Extraction/Extraction.cs:75)
Ludiq.Task:Run() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:68)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:61)
Ludiq.<>c__DisplayClass10_0:b__0() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:33)
System.Threading.ThreadHelper:ThreadStart()

Thanks,

Hi Daniel,

Sorry for the very late reply on this, I didn't notice your new comments.

Indeed, we removed the "Get" prefix for brevity for static property accessors, like Camera.main. You do see the unit in the screenshot above, it's labeled: Camera: Main.

Regarding the Per Second unit, it's actually a bit complex to reinstate it properly with the new strongly typed math system. Unfortunately I don't think it will be available in Alpha 4 yet, but I do intend to find a way to make it available for Bolt 2. Sorry for the inconvenience.

Answered

So coming back to this often in terms of design, my stance changed.

At the core level, for 2.0, we won't be adding back specialized math units.

Users should either:

- Use Mathf utility methods

- Create their own macros

The decision to come to that is that now, macros and custom graphs in general are much more powerful and customizable than in Bolt 1. You can create very compact units for your needs without the need for extending Bolt, and even easily now that you can collapse in a two clicks.

Sounds great once you get the Flow Functions working across classes (in Bolt 2).

And of course update the tutorials ;-)

Thanks