blob: 514da3d79325e0a595c76901fd3632eced0a2484 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using UnityEngine;
public class DisableIfSimple : MonoBehaviour
{
private void Start()
{
Unparent componentInParent = GetComponentInParent<Unparent>();
if ((bool)componentInParent && (bool)componentInParent.parent)
{
base.gameObject.SetActive(!componentInParent.parent.root.GetComponentInChildren<PlayerSkinHandler>().simpleSkin);
}
else
{
base.gameObject.SetActive(!base.transform.root.GetComponentInChildren<PlayerSkinHandler>().simpleSkin);
}
}
}
|