Version: 2017.2

Navigation.defaultNavigation

切换到手册
public static UI.Navigation defaultNavigation ;

描述

返回具有合理默认值的 Navigation

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class ExampleClass : MonoBehaviour { public Button button;

void Start() { //Set the navigation to the default value. ("Automatic" is the default value). button.navigation = Navigation.defaultNavigation; } }