A brief overview on scripting with Makinom.
You can find an overview of all available classes in the API documentation.
When scripting with Makinom, either add the GamingIsLove.Makinom namespace (using) or implement your class in the GamingIsLove.Makinom namespace.
Please note that some of Makinom’s classes are in separate namespaces, e.g. GamingIsLove.Makinom.Components is used for all component classes of Makinom.
Most of what you need is accessible through the Maki class. It holds references to all data directly referenced by the project (e.g. input keys) and handlers for an easy and centralized access point.
All individual data list entries are stored as separate assets, only a some of them can be accessed through the Maki class due to being directly referenced by the project asset:
E.g. if you want to get an input key, you can access it like this:
index is an int value representing the index of the input key in the Makinom editor’s list. You can also access them via their GUID:
guid is a string value representing the GUID of the data.
Beside data list entries, you can also access the general settings, e.g.:
The handlers are used to manage some part of a running game – some examples:
All classes containing settings that are accessible and saved in the editor must be descendants of the IBaseData interface. The interface implements 2 functions, GetData and SetData, using a DataObject class to store the information in it, and a 3rd function (EditorAutoSetup) used by some special editor cases.
It’s easiest to descend your class from the BaseData class, which already has a default implementation of the interface and handles saving/loading the data automatically.
Save games work similar to the settings class – instead of the IBaseData interface, you need to implement the ISaveData interface. You can find an sample implementation in the custom save data documentation.
Adding custom nodes to schematics or formulas doesn’t require implementing them in a plugin or Makinom’s source code – you can just add them in a script file in your Unity project.
You can find more details about custom node implementations in the custom nodes documentation.
Schematic nodes must descend from BaseSchematicNode or any other schematic node class (e.g. BaseSchematicCheckNode for the default Success/Failed slot implementation).
Formula nodes must descend from BaseFormulaNode or any other formula node class (e.g. BaseFormulaCheckNode for the default Success/Failed slot implementation).
You can extend many of Makinom’s type selections with custom implementations by simply adding new scripts descending from their base type class, e.g.:
It’s best to look at Makinom’s default implementation for these kind of classes to learn how to do your custom implementation.
The full source code included in Makinom Pro is a Visual Studio 2017 project and should be ready out of the box.
The required references to Unity DLLs and functionality are already set up (the DLLs are included in the project’s bin/References folders). If you want to use different Unity versions than provided, just replace the references with the libraries you want to use.
© 2015 Gaming is Love e.U.
Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!