您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
28 行
628 B
28 行
628 B
using UnityEngine;
|
|
|
|
public class DisablePerPlatform : MonoBehaviour {
|
|
|
|
public bool showOnPC;
|
|
public bool showOnPS4;
|
|
public bool showOnXbox;
|
|
|
|
// Use this for initialization
|
|
void Start ()
|
|
{
|
|
gameObject.SetActive(showOnPC);
|
|
|
|
switch(Application.platform)
|
|
{
|
|
case RuntimePlatform.PS4:
|
|
{
|
|
gameObject.SetActive(showOnPS4);
|
|
break;
|
|
}
|
|
case RuntimePlatform.XboxOne:
|
|
{
|
|
gameObject.SetActive(showOnXbox);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|