0
Answered

You cannot directly specify a component that exists in the scene.

uasernamako 10 months ago updated by Lazlo Bonin (Lead Developer) 10 months ago 7

I just started using bolts.

I wanted to create a set Text and assign a text component that exists in the scene, but I couldn't find a game object that could be referenced in the window that came out.

(I think there is a Scene tab right next to Asset, but it doesn't exist)

I was able to reference the text component by adding the Text component as a Bolt variable. Is this the correct workflow? (You must register the game object as a variable each time you create a reference object. This feels barren.)

When you look at the Bolt tutorial video, it looks like you can select objects on the scene directly.

Is this because there is something wrong with my environment?



Bolt Version:
1.4.9
Unity Version:
2019.2.13f1
Platform(s):
windows 10
Scripting Backend:
.NET Version (API Compatibility Level):

Answer

+1
Answer
I was able to reference the text component by adding the Text component as a Bolt variable. Is this the correct workflow?

That is indeed the correct workflow. 

When you look at the Bolt tutorial video, it looks like you can select objects on the scene directly.
Is this because there is something wrong with my environment?

There are two types of graph modes in Bolt 1 - macro graph and embed graph. The embed graph can reference objects in the scene directly like in the tutorial. But it can't be reused because it exists only on the object it's on.

Embed graphs as a concept will cease to exist in Bolt 2 so it'd be better to learn the variable workflow. That said, the variables in Bolt 2 will be easier to use. 

+1
Answer
I was able to reference the text component by adding the Text component as a Bolt variable. Is this the correct workflow?

That is indeed the correct workflow. 

When you look at the Bolt tutorial video, it looks like you can select objects on the scene directly.
Is this because there is something wrong with my environment?

There are two types of graph modes in Bolt 1 - macro graph and embed graph. The embed graph can reference objects in the scene directly like in the tutorial. But it can't be reused because it exists only on the object it's on.

Embed graphs as a concept will cease to exist in Bolt 2 so it'd be better to learn the variable workflow. That said, the variables in Bolt 2 will be easier to use. 

Hello, I you sure there will be no ebeded graphs in bolt 2. 

What for is Object scope of a class in that case?

I am using visual scripting only than i need to conect logiccally pre builded components once. 

If it needs to be reused i prefer to make component.

If ebeded graphs will be no more than will scriptable objects assets be hided in project view for classes with scope of Object in oreder to not pollute project with one time used Graphs?

Can't say I know all the specifics but I know for sure embed graphs are going away. 

In the next and last alpha of Bolt 2 flow and state machines are both replaced by a single class machine. A class machine can contain any number of flow and state graphs, variables and custom events. The current variable system also gets replaced by a class variable system so the graph, object, scene, app and saved vars all now will be class variables. 

The variables can be private or public so if you need a single graph on a single object, you could use the private variables for that. 

The object scope for the class I imagine will be similar to the object scope we have right now for the variables. But, again, I don't know the specifics for this yet. Have to wait for alpha 6 release in the next few weeks. 

Bolt 2 will also have its own version of a scriptable object that can be created visually. A Class Asset. And Bolt 2 also will support the Singleton pattern.

In short, we have to wait and see.

Thank you for your explanation.

My main question is though is it mandatory for bolt class asset to exist inside of project  window or it still some how can  live on gameobject.  Becouse if i want to use graph just once i do not need to pollute my project with unneeded assets.

But as you said guess we should wait for alpha 6.

+1

That I can answer, classes do need an asset file in your project window. That said a single folder for all your classes(graphs) shouldn't pollute the project much. 

ああ...
私はマクロでフローグラフを作成したことに気付きました。
Embedで正しく作成したら、シーン上のテキストコンポーネントを選択できるようになりました。

どうもありがとうございました。
Bolt2が待ち遠しいです。