Not working things form tutorial

t1ny_bear 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 1

In my case using examples from tutorial I just faced with some behaviour.

1)  Using attribute "Unitprimaryport" doesn't affect its exptected behaviour.UnitExample.txt

2) Overriding GetHeaderAddonHeight(), GetHeaderAddonWidth() doesn't affect as shown in tutorial. Placing some gui element nothing appears too. I just copy-pasted code snippets from tutorial, but for clearity the code would attached. UnitWigetExample.txt The picture result shown in 1).

I have other questions that, I suppose, would be helpful for begginers.

1] When I create ValueInput ports dynamicly in some unit, the custom created one(by default as field, actually) with "UnitPortOrder" with some big value e.g.100, the last won't ordered properly.

In the picture "WGO" ValueInput port with order = 100, other ports created dynamicly. But how it shown, ordering doesn't work.

2] In tutorials said nothing about UnitGenerator<> class. We using UnitWidgets to customize our own visualising, in Unit we set unit logic. But when I should use UnitGenerator<> class?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2

You should message me on Discord, join mine, ping me in Ludiqs, or send me an email if you want help with the tutorial. Ludiq has 0 affiliation with my tutorials. Probably won't know some of what your referring to as a reference.

For C# Gen, under how to generate a unit, there is a warning:

"C# generation classes are necessary for the rest of the graphs to generate properly. At this moment there is no Bolt Classes yet, so we have not begun tutorials on that."

I plan to as soon as we get the final alpha, and I can toy around with all the new changes. There was just too many incoming changes. Didn't want to learn it all then a lot changed immediately after I got comfortable enough to make a tutorial. 

2nd, Im sorry about the widget header not showing up, looks like I didn't paste that line of code in. Override useHeaderAddon I believe it is. Set that to true. Ill update this and try to make that warning more obvious within the next day.

I'm assuming overriding the header is the cause for the primary port. It may be using that to draw the ports up top. Try including the base of the method before your content. See if that works. If that's the case I'll add that in.

Not sure on the port ordering attribute. Never used it. But the above should fix the rest. Let me know if anything is still not working after. Hope it helps. 

EDIT: I guess I expected everyone to follow from the first tutorials, indeed there is no warning on that particular tutorial. Only the Unit tutorials. That one was more about editor side, so I didn't include it. I'll add the warning to that tutorial too.