-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccessStaff.cs
More file actions
32 lines (29 loc) · 804 Bytes
/
AccessStaff.cs
File metadata and controls
32 lines (29 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class AccessStaff : UdonSharpBehaviour
{
public GameObject[] _basicAccess;
public GameObject[] _staffAccess;
public string[] _eventAdmins;
public void Start()
{
if (Networking.LocalPlayer.isInstanceOwner) {
foreach(GameObject go in _basicAccess) {
go.SetActive(true);
}
}
foreach(string _adminPlayers in _eventAdmins) {
if (Networking.LocalPlayer.displayName == _adminPlayers) {
//foreach(GameObject go in _staffAccess) {
//go.GetComponent<Collider>().isTrigger = true;
//go.SetActive(true);
//}
foreach(GameObject go in _basicAccess) {
go.SetActive(true);
}
}
}
}
}