public void ButtonMale() { Destroy(GameObject.Find("UMACrowd").transform.GetChild(0).gameObject); crowdHandle.ResetSpawnPos(); GameObject myUma = crowdHandle.GenerateOneUMA(0); myUma.transform.localRotation = Quaternion.Euler(new Vector3(0, 180, 0)); GetUMAData(myUma); if (bodyArea != 0) { float yPos = GameObject.Find("NoseMiddle").transform.position.y; myCamera.transform.position = new Vector3(0, yPos + 0.05f, -0.62f); if (bodyArea == 2) { panel.FindChild("LowerHead/FacialHair").gameObject.SetActive(true); } } }
private void Start() { panel = GameObject.Find("Canvas/Panel").transform; bodyGO = panel.FindChild("Body"); topHeadGO = panel.FindChild("UpperHead"); lowHeadGO = panel.FindChild("LowerHead"); /*skinColors = new Color[]{ * Color.white, * new Color32(233, 233, 233, 255), * new Color32(211, 211, 211, 255), * new Color32(189, 189, 189, 255), * new Color32(167, 167, 167, 255), * new Color32(145, 145, 145, 255), * new Color32(123, 123, 123, 255), * new Color32(101, 101, 101, 255), * new Color32(079, 079, 079, 255), * new Color32(057, 057, 057, 255), * }; * * eyeColors = new Color[]{ * new Color32(165, 188, 255, 255), * new Color32(111, 147, 255, 255), * new Color32(122, 088, 045, 255), * new Color32(054, 135, 011, 255), * new Color32(127, 152, 79, 255), * }; * * hairColors = new Color[]{ * Color.white, * new Color32(255, 246, 172, 255), * new Color32(255, 211, 103, 255), * new Color32(255, 204, 094, 255), * new Color32(191, 061, 039, 255), * new Color32(109, 031, 018, 255), * new Color32(159, 109, 000, 255), * new Color32(086, 048, 000, 255), * new Color32(039, 022, 000, 255), * Color.black, * }; * * femaleHairStyles = new string[]{ * "FemaleShortHair01", * "FemaleLongHair01", * }; * * maleHairStyles = new string[]{ * "MaleHair01", * "MaleHair02", * }; * * facialHairStyles = new string[,]{ * {"",""}, * {"MaleBeard01",""}, * {"MaleBeard02",""}, * {"MaleBeard03",""}, * {"MaleBeard01","MaleBeard02"}, * {"MaleBeard02","MaleBeard03"}, * {"MaleBeard03","MaleBeard01"}, * };*/ myCamera = GameObject.Find("NormalCamera").transform; crowdHandle = GameObject.Find("UMACrowd").GetComponent <UMACrowd>(); sliderControlList = new Slider[19]; sliderControlList2 = new Slider[18]; sliderControlList3 = new Slider[14]; InitSliders(); int randomResult = Random.Range(0, 2); GameObject myUma = crowdHandle.GenerateOneUMA(randomResult); myUma.transform.localRotation = Quaternion.Euler(new Vector3(0, 180, 0)); GetUMAData(myUma); }