Makinom - Game Toolkit for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • Makinom 1
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get Makinom
  • Home
  • Guide
  • Machines
  • Render Machine
View Categories

Render Machine

3 min read

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

Render machines are Unity components that are added to game objects. They’re mostly used for game logic related to rendering, e.g. objects becoming visible/invisible to the camera.

A render machine component can be added through the components menu (Makinom > Machines > Render Machine) or the scene wizard (Add Machine > Render Machine). A game object with a render 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 #

A render machine is started by renderer and camera callback functions.

Became Invisible #

Started when the machine’s game object is no longer visible by any camera. It’s implemented in the component’s OnBecameInvisible function.

Example #

This start type can be used to disable game objects that are no longer visible. Use a Activate Object node to enable or disable a game object.

Became Visible #

Started when the machine’s game object became visible by any camera. It’s implemented in the component’s OnBecameVisible function.

Example #

This start type can be used to add a visible object to a HUD’s user list. Use a Call HUD node to add users to a HUD.

Pre Render #

Started before a camera starts rendering the scene and if the machine is attached to a camera. It’s implemented in the component’s OnPreRender function.

If you want to change the camera’s viewing parameters, do this in Pre Cull instead.

Example #

This start type can be used to make final adjustments to the camera before rendering. Use a Change Camera Options node to change settings of the camera.

Post Render #

Started after a camera finished rendering the scene and if the machine is attached to a camera. It’s implemented in the component’s OnPostRender function.

Example #

This start type can be used to reset camera adjustments after rendering. Use a Change Camera Options node to change settings of the camera.

Pre Cull #

Started before the camera culls the scene. It’s implemented in the component’s OnPreCull function.

Culling determines which objects are visible to the camera.

Example #

This start type can be used to make final adjustments to the camera before rendering. Use a Change Camera Options node to change settings of the camera.

Will Render Object #

Started once for each camera the machine’s game object is visible in during culling. It’s implemented in the component’s OnWillRenderObject function.

Example #

This start type can be used to make final adjustments to the game object. E.g. use a Change Color node to change the game object’s color.

Render Object #

Started after the camera has rendered the scene, similar to Post Render, but used on all game objects not only cameras. It’s implemented in the component’s OnRenderObject function.

Example #

This start type can be used to reset adjustments on a game object. E.g. use a Change Color node to change the game object’s color back.

Machines

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Updated on December 16, 2020
Table of Contents
  • Start Types
    • Became Invisible
      • Example
    • Became Visible
      • Example
    • Pre Render
      • Example
    • Post Render
      • Example
    • Pre Cull
      • Example
    • Will Render Object
      • Example
    • Render Object
      • 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 (84)
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!