Beispiel #1
0
    private void GatherCmdArgs()
    {
        InsightArgs args = new InsightArgs();

        if (args.IsProvided("-NetworkAddress"))
        {
            Debug.Log("[Args] - NetworkAddress: " + args.NetworkAddress);
            NetworkAddress = args.NetworkAddress;
        }

        if (args.IsProvided("-NetworkPort"))
        {
            Debug.Log("[Args] - NetworkPort: " + args.NetworkPort);
            NetworkPort = (ushort)args.NetworkPort;
            networkManagerTelepathyTransport.port = (ushort)args.NetworkPort;
        }

        if (args.IsProvided("-SceneName"))
        {
            Debug.Log("[Args] - SceneName: " + args.SceneName);
            GameScene = args.SceneName;
            SceneManager.LoadScene(args.SceneName);
        }

        if (args.IsProvided("-UniqueID"))
        {
            Debug.Log("[Args] - UniqueID: " + args.UniqueID);
            UniqueID = args.UniqueID;
        }

        //Start NetworkManager
        networkManager.StartServer();
    }
    public void ParseArgs()
    {
        InsightArgs args = new InsightArgs();

        if (args.IsProvided("-ScenePath"))
        {
            Debug.Log("ScenePath: " + args.ExtractValue("-ScenePath"));
            SceneManager.LoadScene(args.ExtractValue("-ScenePath"));
        }
    }