Beispiel #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();


        VRInputLookup script = (VRInputLookup)target;

        if (GUILayout.Button("Apply Settings"))
        {
            EditorUtility.SetDirty(target); // Forces Unity to save changes

            script.Right.Apply();
            script.Left.Apply();

            script.UpdateLastApplied();
        }
    }
Beispiel #2
0
    public void ApplySettings(bool remindAboutOther)
    {
        if (vrInputLookup == null)
        {
            Debug.LogError("No Lookup assigned!");
            return;
        }

        currentController.CopyFromSetup(this);
        vrInputLookup.UpdateLastApplied();

        string hand    = HandStatus();
        string warning = hand + " controller's settings applied.";

        if (remindAboutOther)
        {
            warning += " Please remember to set up the other controller as well!";
        }

        Debug.LogWarning(warning);
    }