public override bool Init()
        {
            Instance = this;

            try
            {
                InitConsole();

                AutoCompleter.Init();
#if MONO
                DummyBehaviour.Setup();
#endif

                ResetConsole(false);
                // Make sure compiler is supported on this platform
                Evaluator.Compile("");

                return(true);
            }
            catch (Exception e)
            {
                string info = "The C# Console has been disabled because";
                if (e is NotSupportedException && e.TargetSite?.Name == "DefineDynamicAssembly")
                {
                    info += " Reflection.Emit is not supported.";
                }
                else
                {
                    info += $" of an unknown error.\r\n({e.ReflectionExToString()})";
                }

                ExplorerCore.LogWarning(info);

                return(false);
            }
        }
 public void Setup()
 {
     m_GameObject = new GameObject("MonoBehaviour extensions test");
     m_Behaviour  = m_GameObject.AddComponent <DummyBehaviour>();
 }
	public static void HTTPGetRequest( string requestString, HTTPRequestComplete onComplete )
	{
		DummyBehaviour.StartCoroutine( SendGetRequestAsyncHelper( requestString, onComplete ) ) ;
	}
	public static void HTTPPostRequest( string requestString, byte[] data, Dictionary< string, string > headers, HTTPRequestComplete onComplete )
	{
		DummyBehaviour.StartCoroutine( SendPostRequestAsyncHelper( requestString, data, headers, onComplete ) ) ;
	}
示例#5
0
 void Start()
 {
     _dummy = gameObject.GetComponent <DummyBehaviour> ();
 }