August
10
2017

Learn how to extend Makinom’s settings with custom code.

Did you know that you can add your custom settings to some of Makinom’s type selections? You just need to place your custom script file in your Unity project to have them available, no need to change Makinom’s source code!

This is currently supported for the following settings:

  • Bool value selections
  • Float value selections
  • String value selections
  • Vector3 value selections
  • Input key origins
  • HUD types
  • HUD element types

Your custom scripts need to descend from a base class type to automatically add the settings to the selections.

Extending value selections

Bool, float, string and Vector3 value selections can be found everywhere in the Makinom editor and components. The goal of your custom extension is to return a bool, float, string or Vector3 value.

For example implementations, have a look at the built-in value selection classes that are included in the full version’s source code.

Bool value selections

Depending on which bool value selection you want to extend, you have to use different base class types.

Basic bool value selections

The basic bool value selections are those found in the Makinom editor and components, except for bool value selections in formulas and schematics.

Your custom script has to descend from the BoolValue_BaseType class.

Formula bool value selections

The formula bool value selections are only available in formulas (Game > Formulas).

Your custom script has to descend from the FormulaBool_BaseType class.

Schematic bool value selections

The schematic bool value selections are only available in schematics.

Your custom script has to descend from the SchematicBool_BaseType class.

Float value selections

Depending on which float value selection you want to extend, you have to use different base class types.

Basic float value selections

The basic float value selections are those found in the Makinom editor and components, except for bool value selections in formulas and schematics.

Your custom script has to descend from the FloatValue_BaseType class.

Formula float value selections

The formula float value selections are only available in formulas (Game > Formulas).

Your custom script has to descend from the FormulaFloat_BaseType class.

Schematic float value selections

The schematic float value selections are only available in schematics.

Your custom script has to descend from the SchematicFloat_BaseType class.

String value selections

Depending on which string value selection you want to extend, you have to use different base class types.

Basic string value selections

The basic string value selections are those found in the Makinom editor and components, except for bool value selections in formulas and schematics.

Your custom script has to descend from the StringValue_BaseType class.

Formula string value selections

The formula string value selections are only available in formulas (Game > Formulas).

Your custom script has to descend from the FormulaString_BaseType class.

Schematic string value selections

The schematic string value selections are only available in schematics.

Your custom script has to descend from the SchematicString_BaseType class.

Vector3 value selections

Depending on which Vector3 value selection you want to extend, you have to use different base class types.

Basic Vector3 value selections

The basic Vector3 value selections are those found in the Makinom editor and components, except for bool value selections in formulas and schematics.

Your custom script has to descend from the Vector3Value_BaseType class.

Formula Vector3 value selections

The formula Vector3 value selections are only available in formulas (Game > Formulas).

Your custom script has to descend from the FormulaVector3_BaseType class.

Schematic Vector3 value selections

The schematic Vector3 value selections are only available in schematics.

Your custom script has to descend from the SchematicVector3_BaseType class.

Extending HUDs

Extending HUDs with completely new HUD types of just new HUD elements for existing HUD types is more complex than extending value types (which basically only have to implement one method).

For example implementations, have a look at the built-in HUD and HUD element classes that are included in the full version’s source code.

HUD type selection

Add a new HUD type by descending your custom script from the BaseHUDSetting class.

The most important function to implement is the Create function. This function is used to create an instance of a class derived from the GUIBoxContent class, which is used by a GUI box to display the actual content of the HUD.

HUD element type selections

Add new HUD elements to existing HUD types by descending your custom script from their individual base type classes.

Information HUD elements

Your custom script has to descend from the BaseInformationHUDElementSetting class.

Interaction HUD elements

Your custom script has to descend from the BaseInteractionHUDElementSetting class.

Control HUD elements

Your custom script has to descend from the BaseControlHUDElementSetting class.

Tooltip HUD elements

Your custom script has to descend from the BaseInformationHUDElementSetting class.