Runtime Archimatix
Runtime Archimatix
using AX;
public class GrayShipDesigner : MonoBehaviour {
public AXModel model;
}
After doing this, you can drag the AXModel aGameObject into the
ObjectField in your runtime script. With this reference to the parametric
model, you can get and set the parameters that you have promoted put to
the model interface. When you set these parameters, they will ripple
their value change throughout the graph based on the Relations you have
established between parameters.
using AX;
}
In the Start function, you can establish these parameter references using
the getParameter function. This function uses the name you have given
the parameter in the graph to find the parameter:
void Start () {
if (model != null)
{
P_Channel = model.getParameter("Engine.Channel");
P_Radius = model.getParameter("Engine.radius");
}
}
// Set the value of the parameter and let this change ripple through the network of Rela
tions
P_Radius.initiatePARAMETER_Ripple_setFloatValueFromGUIChange(val);
// Let the model know that you are done making your changes,
// but not necessarily to create new game objects.
// isAltered() is often called during a repetitive change such as with a slider.
model.isAltered();
radius = val;
recalculate();
}
// Set the value of the parameter and let this change ripple through the network of Rela
tions
P_Channel.initiatePARAMETER_Ripple_setFloatValueFromGUIChange(engineTyp
eDropdown.value);
// Tell the model to rebuild its GameObjects.
// autobuild() is often called after a Dropdown or Checkbox UI is modified.
model.autobuild();
recalculate();
}
That’s all that you need to get started with runtime Archimatix! There
will be full API published eventually as well as some example scenes.