Makinom - Game Toolkit for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • Makinom 1
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get Makinom

Guide

Getting Started

  • Introduction
  • First Steps
  • Game Starters
  • Components Overview
  • Upgrading a Makinom 1 Project

Editor

  • Makinom Editor Overview
  • Node Editor
  • Asset Sources
  • Editor Section
  • Base/Control Section
  • Game Section
  • UI Section
  • Templates Section

Features

  • Schematics
  • Dialogue Importer
  • Schematic Nodes
  • Formula Nodes
  • Languages
  • Input Keys
  • Audio and Music
  • Game States
  • Pooling
  • Saving Game Objects
  • Scene Objects
  • Save Games
  • Variables
  • Selected Data

Machines

  • Machine Components Overview
  • Animation Machine
  • Animation State Machine
  • Application Machine
  • Auto Machine
  • Collision Machine
  • Global Machine
  • Interaction Machine
  • Render Machine
  • Tagged Machine
  • Template Machine
  • Tick Machine
  • Trigger Machine

UI System

  • UI System Overview
  • UI Layers
  • UI Layouts
  • UI Boxes
  • HUDs
  • Flying Texts
  • Text Codes
  • Unity UI Module
  • HUDs: Content Providers
  • HUDs: Conditions
  • HUDs: Click Actions

Scripting

  • Scripting Overview
  • Code Extensions
  • Custom Save Data
  • Custom Component Save Data
  • Custom Nodes
  • Starting a Schematic

Advanced Topics

  • Build Troubleshooting
  • Performance Optimizations
  • Home
  • Guide
  • Documentation
  • Machines
  • Auto Machine

Auto Machine

Table of Contents
  • Start Types
    • Start
      • Example
    • Enable
      • Example
    • Disable
      • Example
    • Destroy
      • Example
    • Level Was Loaded
      • Example

Learn more about auto machines and what you can use them for.

Auto machines are Unity components that are added to game objects. They’re mostly used for initializing things (e.g. spawning prefabs when a level was loaded) or starting repeating schematics (e.g. for player or camera controls, using the Restart Schematic node).

An auto machine component can be added through the components menu (Makinom > Machines > Auto Machine) or the scene wizard (Add Machine > Auto Machine). A game object with an auto machine is represented in the Unity scene view by this gizmo icon:

You can learn more about machine components in general and their basic settings here.

Start Types #

An auto machine is started when a game object is initialized/enabled or destroyed/disabled.

Start #

Started when the machine’s game object or component is first added to the scene. It’s implemented in the component’s Start function.

The start can optionally be delayed by a defined amount of time, and repeat the execution after a defined amount of time.

Example #

This start type can be used to show a main menu when starting the game. Use a Show Dialogue node to create menus (Choice dialogue type).

Enable #

Started each time when the machine’s game object or component is enabled. It’s implemented in the component’s OnEnable function.

The start can optionally be delayed by a defined amount of time, and repeat the execution after a defined amount of time.

Example #

This start type can be used to reset variables or values of the game object each time it’s enabled. Use a Change Variables node to change variables, or use a Change Fields node to change other components’ field values.

Disable #

Started when the machine’s game object is disabled. It’s implemented in the component’s OnDisable function.

Example #

This start type can be used to reenable the game object after some time. Use a Wait node to wait for a defined amount of time and an Activate Object node to enable the game object.

Destroy #

Started when the machine’s game object is destroyed. It’s implemented in the component’s OnDestroy function.

Example #

This start type can be used to store the position of the game object before it’s destroyed. Use a Change Variables node to store the position of a game object into a Vector3 variable.

Level Was Loaded #

Started after a new level was loaded. It’s implemented in the component’s OnLevelWasLoaded function.

The start can optionally be delayed by a defined amount of time, and repeat the execution after a defined amount of time.

Example #

This start type can be used to reset variables on persistant game objects after loading a new scene. Game objects can be made persistant (i.e. they wont be destroyed when loading a new scene) by using a Don’t Destroy on Load node. Use a Change Variables node to change variables.

Machines
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on December 16, 2020
Table of Contents
  • Start Types
    • Start
      • Example
    • Enable
      • Example
    • Disable
      • Example
    • Destroy
      • Example
    • Level Was Loaded
      • Example
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • Makinom 1 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get Makinom
  • Contact
  • Blog
  • ORK Framework
  • gamingislove.com
Categories
  • Makinom 1 (97)
    • Tutorial (97)
      • 2D Platformer (14)
      • 2D Roguelike (8)
      • Breakout (6)
      • How-to (34)
      • Match 3 (6)
      • Schematic (4)
      • Scripting (6)
      • Space Shooter (11)
      • Survival Shooter (8)
  • News (11)
  • Release (68)
Search

© 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!