Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 645

Access Block Constants without Instance

$
0
0
Hello fellow engineers!

I have been working on a new script recently and discovered that you can only access block constants if you have an instance of that block.

For example, I wanted to access the maximum gravitational acceleration a gravity generator block can output.
This can be done by
Code:
grav_block_list[0].GetMaximum<float>("Gravity")
But not by
Code:
IMyGravityGenerator.GetMaximum<float>("Gravity") 
Or some such.

I've looked throughout the API, but I can't find...

Access Block Constants without Instance

Viewing all articles
Browse latest Browse all 645