Skip to content

Instantly share code, notes, and snippets.

@glitchersgames
Created July 8, 2016 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glitchersgames/76c78d14f9efdff67abd267f8cc935e5 to your computer and use it in GitHub Desktop.
Save glitchersgames/76c78d14f9efdff67abd267f8cc935e5 to your computer and use it in GitHub Desktop.
using System;
using UnityEngine;
using UnityEngine.Networking;
[DisallowMultipleComponent]
public class NetworkSpawnPosition : SceneDependencyBehaviour
{
public void Awake()
{
NetworkManager.RegisterStartPosition(transform);
SetDependencyReady();
}
public void OnDestroy()
{
NetworkManager.UnRegisterStartPosition(transform);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment