Code Extensions

Extend Makinom’s functionality and settings with custom code.

Adding Custom Classes #

You can extend many of Makinom’s type selections and settings with custom implementations by simply adding new scripts extending from a base type class and adding the EditorSettingInfo attribute to the class.

It’s best to look at Makinom’s default implementation in the source code for these kind of classes to learn how to do your custom implementation (you can see the available base types below).

EditorSettingInfo Attribute #

The EditorSettingInfo attribute is required for adding custom selections in popup fields (e.g. for custom float value types). It needs to be added to your custom class (see the examples below for a custom input ID key implementation).

It defines the name and description of the selection.

[EditorSettingInfo("Name", "Description")]
public class YourCustomOriginInputIDKeySetting : BaseInputIDKeySetting
  • Name
    The 1st string parameter is the name of the setting.
  • Description
    The 2nd string parameter is the description of the setting (e.g. listed in help texts).

You can optionally also define a different name to be displayed in the popup list, e.g. for separating into sub-selections using a ‘/‘.

[EditorSettingInfo("Name", "Description", "Sub Selection/Name)]
public class YourCustomOriginInputIDKeySetting : BaseInputIDKeySetting
  • List Name (optional)
    The optional 3rd string parameter uses a different name to display the selection in popup lists.
    Use ‘/‘ to separate it into a sub-selection.

IObjectSelection Interface #

Some classes are implemented as generic classes with the IObjectSelection interface as a requirement for the generic type, e.g. the bool value type.

public class BoolValue_YourCustomType<T> : BoolValue_BaseType<T> where T : IObjectSelection, new()

You don’t really need to worry about this for your custom implementations – the used object selection implementation is defined wherever your custom setting is used (e.g. in a schematic node).

The IObjectSelection interface is implemented in the following classes and is responsible for selecting context-based (game) objects.

FormulaObjectSelection #

Used in formulas to select an object (e.g. user).

SchematicObjectSelection #

Used in schematics to select an object (e.g. machine object).

GameObjectSelection #

Used outside of formulas and schematics.

General Settings #

Extend different functionality all across the framework.

Input ID Key #

Input ID keys define the input origins available in input keys. Learn more about input keys in this documentation.

You can add a custom input origin by extending from BaseInputIDKeySetting.

public class YourCustomOriginInputIDKeySetting : BaseInputIDKeySetting

There are already custom input origin extensions available in the Makinom extensions – e.g. see the Unity Input Action extension.

Game State Change Event #

Game state change events are used by game states to automatically activate/inactivate when the event is fired.

You can add a custom game state change event by extending from BaseGameStateChangeType.

public class YourCustomGameStateChangeType : BaseGameStateChangeType

Movement Component #

Movement components are e.g. used by the Move To Interaction settings or the ORK Framework extension for moving combatants.

You can add a custom movement component selection by extending from BaseMovementComponentSetting.

public class YourCustomMovementComponentSetting : BaseMovementComponentSetting

Files & Assets #

Extend file handling, e.g. save games or language export.

Editor Language Export #

You can add custom language export/import functionality by extending from BaseLanguageExportFormat.

public class CustomLanguageExportFormat : BaseLanguageExportFormat

This requires using or implementing your class in Makinom’s editor namespace:

namespace GamingIsLove.Makinom.Editor

Asset Source #

Asset selections in the editor can use assets from different sources, e.g. direct reference or asset bundles. Learn more about asset sources in this documentation.

You can add a custom asset source by extending from BaseAssetSource<T>.

public class YourCustomAssetSource<T> : BaseAssetSource<T> where T : UnityEngine.Object

T is a Unity Object, i.e. it can be any kind of asset.

Save Game File #

You can add a custom save game file selection by extending from BaseSaveGameFileHandler.

public class YourCustomSaveGameFileHandler : BaseSaveGameFileHandler

Text File #

You can add a custom text file selection (used by text nodes in schematics) by extending from BaseTextFileHandler.

public class YourCustomTextFileHandler : BaseTextFileHandler

Values #

Extend how values are defined or changed.

Interpolation #

You can add a custom interpolation selection by extending from BaseInterpolation.

public class YourCustomInterpolation : BaseInterpolation

Float Operator #

Float operators are used for float value changes, e.g. adding, multiplying or dividing float values.

You can add a custom float operator by extending from BaseFloatOperator.

public class YourCustomFloatOperator : BaseFloatOperator

String Operator #

String operators are used for string value changes, e.g. appending or replacing strings in other strings.

You can add a custom string operator by extending from BaseStringOperator.

public class YourCustomStringOperator : BaseStringOperator

Vector3 Operator #

Vector3 operators are used for Vector3 value changes, e.g. adding or multiplying Vector3 values.

You can add a custom Vector3 operator by extending from BaseVector3Operator.

public class YourCustomVector3Operator : BaseVector3Operator

Bool Value Type #

Bool value types are used by bool value selections.

You can add a custom bool value type by extending from BoolValue_BaseType<T>.

public class BoolValue_YourCustomType<T> : BoolValue_BaseType<T> where T : IObjectSelection, new()

Float Value Type #

Float value types are used by float value selections.

You can add a custom float value type by extending from FloatValue_BaseType<T>.

public class FloatValue_YourCustomType<T> : FloatValue_BaseType<T> where T : IObjectSelection, new()

String Value Type #

String value types are used by string value selections.

You can add a custom string value type by extending from StringValue_BaseType<T>.

public class StringValue_YourCustomType<T> : StringValue_BaseType<T> where T : IObjectSelection, new()

Vector3 Value Type #

Vector3 value types are used by Vector3 value selections.

You can add a custom Vector3 value type by extending from Vector3Value_BaseType<T>.

public class Vector3Value_YourCustomType<T> : Vector3Value_BaseType<T> where T : IObjectSelection, new()

Conditions #

Extend condition settings with custom conditions.

General Condition #

General conditions are used all across the framework.

You can add a custom general condition by extending from BaseGeneralCondition<T>.

public class YourCustomGeneralCondition<T> : BaseGeneralCondition<T> where T : IObjectSelection, new()

Component Condition #

Component conditions are used by multiple components, e.g. machine components.

You can add a custom component condition by extending from BaseComponentCondition.

public class YourCustomComponentCondition : BaseComponentCondition

Notify Machine Start #

Notify machine starts are used by Auto Machines as notification start types, e.g. starting when a global variable changed.

You can add a custom notify machine start by extending from BaseNotifyMachineStart.

public class YourCustomNotifyMachineStart : BaseNotifyMachineStart

Schematics #

Extend schematic functionality – also check out how to create custom nodes.

Actor Type #

You can add a custom actor type by extending from BaseActorType.

public class YourCustomActorType : BaseActorType

Move Component #

Unline the Movement Component above, this is used by position nodes for moving game objects via a selected method, e.g. via rigidbody or transform, or event Movement Components defined above.

You can add a custom move component by extending from BaseMoveComponentType.

public class YourCustomMoveComponentType : BaseMoveComponentType

Rotate Component #

Like the Move Component, this is used in movement/rotation nodes for rotating game objects.

You can add a custom rotate component by extending from BaseRotateComponentType.

public class YourCustomRotateComponentType : BaseRotateComponentType

Raycast Selection #

You can add a custom raycast selections to raycast nodes (schematics) by extending from BaseRaycastType<T>.

public class YourCustomRaycastType<T> : BaseRaycastType<T> where T : IObjectSelection, new()

Shapecast Selection #

You can add a custom shapecast selections to raycast nodes (schematics) by extending from BaseShapecastType<T>.

public class YourCustomShapecastType<T> : BaseShapecastType<T> where T : IObjectSelection, new()

Shapecheck Selection #

You can add a custom shapecheck selections to raycast nodes (schematics) by extending from BaseShapecheckType<T>.

public class YourCustomShapecheckType<T> : BaseShapecheckType<T> where T : IObjectSelection, new()

UI #

Extend UI functionality.

HUD Click Action #

HUD click actions are used to execute something when clicking on a part of a HUD, e.g. used in the HUD Click component when using the Unity UI module.

You can add a custom HUD click action type by extending from BaseHUDClickAction.

public class YourCustomHUDClickAction : BaseHUDClickAction

HUD Condition #

HUD conditions are used to show or hide parts of a HUD based on conditions, e.g. used in the HUD Condition component when using the Unity UI module.

You can add a custom HUD condition by extending from BaseHUDCondition.

public class YourCustomHUDCondition : BaseHUDCondition

Navigation Bar Point #

Navigation bar HUDs can display custom navigation content.

You can add a custom navigation bar point by extending from BaseNavigationBarPoint.

public class YourCustomNavigationBarPoint : BaseNavigationBarPoint

Tooltip Check #

Tooltip HUDs can optionally be limited to defined tooltips via tooltip checks.

You can add a custom tooltip check by extending from BaseTooltipCheck.

public class YourCustomTooltipCheck : BaseTooltipCheck

HUD Setting #

Add custom HUD settings to add your own HUD handling.

You can add a custom HUD by extending from BaseHUDSetting.

public class YourCustomHUDSetting : BaseHUDSetting

Input Option #

Add custom input options to option dialogues.

You can add a custom input option by extending from BaseInputOption<T>.

public class YourCustomInputOption<T> : BaseInputOption<T> where T : IObjectSelection, new()

UI Layout Type #

Add custom UI layout types to UI > UI Layouts.

You can add a custom UI layout type by extending from UIBaseLayoutSettings.

public class UIYourCustomLayoutSettings : UIBaseLayoutSettings

Unity Wrapper #

The Unity wrapper functionality allows replacing default Unity functionality. You can find the settings in Game > Game Settings.

You can extend it with custom functionality, e.g. adding 3rd party pooling or loading screen solutions.

Instantiate #

Manages how game objects are instantiated via the Unity wrapper functionality. You can find custom implementations in the Makinom extensions.

You can add a custom instantiate function by extending from BaseInstantiateSetting.

public class YourCustomInstantiateSetting : BaseInstantiateSetting

Destroy #

Manages how game objects are destroyed via the Unity wrapper functionality. You can find custom implementations in the Makinom extensions.

You can add a custom destroy function by extending from BaseDestroySetting.

public class YourCustomDestroySetting : BaseDestroySetting

Scene Load #

Manages how scenes are loaded via the Unity wrapper functionality. You can find custom implementations in the Makinom extensions.

You can add a custom scene load function by extending from BaseLoadSceneSetting.

public class YourCustomLoadSceneSetting : BaseLoadSceneSetting

Random Number #

Manages how random numbers are generated via the Unity wrapper functionality.

You can add a custom random number generation by extending from BaseRandomNumberSetting.

public class YourCustomRandomNumberSetting : BaseRandomNumberSetting