예제 #1
0
    /// <summary>A builtin method of the `Editor` class.</summary>
    /// <remarks>Implement this function to make a custom inspector.</remarks>
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Rect rect = EditorGUILayout.GetControlRect(false, infoHeight);

        GvrInfoDrawer.Draw(rect, INFO_TEXT, MessageType.None);
    }
    private void CreateSupportsPositionalHeadTrackingInfoBox()
    {
        if (GvrHeadset.editorSupportsPositionalHeadTracking)
        {
            infoText     = "Editor supports Positional Tracking.";
            numInfoLines = 2;
        }
        else
        {
            infoText     = "Editor does not support Positional Tracking.";
            numInfoLines = 2;
        }

        infoHeight = GvrInfoDrawer.GetHeightForLines(numInfoLines);
        Rect rect = EditorGUILayout.GetControlRect(false, infoHeight);

        GvrInfoDrawer.Draw(rect, infoText, MessageType.None);
    }
예제 #3
0
 private void OnEnable()
 {
     infoHeight = GvrInfoDrawer.GetHeightForLines(NUM_INFO_LINES);
 }