Created
May 7, 2016 12:29
-
-
Save ted80/f65fc6eacb9de4646fb18cabeea8b6ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Main : MonoBehaviour | |
{ | |
void Start () | |
{ | |
CommandManager.registerCommand(onCommandLoadLevel, "load"); | |
} | |
public void onCommandLoadLevel(string[] _params) | |
{ | |
if(_params.Length == 0 || string.IsNullOrEmpty(_params[0])) | |
{ | |
CommandConsole.Log("Invalid parameter! Example: load [levelname]", new Color32(255, 255, 0, 255)); | |
return; | |
} | |
CommandConsole.Log("Loading level: " + _params[0]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment