예제 #1
0
 void Start()
 {
     if (!cameraController)
     {
         cameraController = FindObjectOfType <CameraController>();
         if (cameraController)
         {
             originalWheelMode = cameraController.wheelMode;
         }
     }
     windowController = FindObjectOfType <WindowController>();
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        if (!uiController)
        {
            uiController = FindObjectOfType <VrmUiController>();
        }

        if (!cameraController)
        {
            cameraController = FindObjectOfType <CameraController>();
            if (cameraController)
            {
                originalWheelMode = cameraController.wheelMode;
            }
        }

        // Load the initial motion.
        LoadMotion(Application.streamingAssetsPath + "/default_bvh.txt");

        // Load the initial model.
        string[] cmdArgs = System.Environment.GetCommandLineArgs();
        if (cmdArgs.Length > 1)
        {
            LoadModel(cmdArgs[1]);
        }
        else
        {
            LoadModel(Application.streamingAssetsPath + "/default_vrm.vrm");
        }

        // Initialize window manager
        windowController = FindObjectOfType <WindowController>();
        if (windowController)
        {
            // Add a file drop handler.
            windowController.OnFilesDropped += Window_OnFilesDropped;
        }
    }