MLAPI and inactive objects

Levels & the hierarchy

I have currently set up Xevious to use a level mechanism where all the levels are in the hierarchy, but only one is active. What I did not appreciate is that MLAPI makes optimisations based upon if the objects are active or not.

Inactive in the hierarchy, and not spawned
Spawn objects when loading the level

Current Workaround

Whilst I await a chat with the MLAPI gurus, my, “I am not proud of this” workaround is to start with the game with the hierarchies active and then disable them. This means that when the scene loads MLAPI sets up the correct Network Objects and then Unity disables them.

Active and Spawned

Unity, VR, Enterprise and .Net Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Auto compile-time support for Unity Tags

Art of writing template files — Drupal 8

Fix “Killed” Response in Rails Console or Sidekiq Job Silently not working

https://samsaffron.com/archive/2013/03/19/flame-graphs-in-ruby-miniprofiler

How Can a Senior Programmer Become a Good Mentor?

Guidelines for Chaos Engineering, Part 2

How to install window 10 by using pendrive?

Introduction to Kubernetes

Get real-time updates from the financial market with your own bot on Telegram

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul Marsh

Paul Marsh

Unity, VR, Enterprise and .Net Developer

More from Medium

Platformer: Player Animation Part 3 (continued)

Day 101: Character Animation Part 4

Light layers in Unity HDRP

2.5D Phase1 Framework: Collectible