private void Start() { QualitySettings.shadowDistance = 100; Weapon = GameObject.Find("weapon"); isShow = false; // Get runtime builder main class runtimeBuilder = (uteRuntimeBuilder) this.gameObject.GetComponent<uteRuntimeBuilder>(); // Set Raycast distance (to not let build far away) runtimeBuilder.SetRaycastDistance(3.0f); // Set snapping to be fixed 1.0f runtimeBuilder.SetSnapOption("fixed"); // Set fixed raycast position from Screen point (form center of the screen) runtimeBuilder.SetFixedRaycastPosition(new Vector2(Screen.width/2,Screen.height/2)); // Get mcraft Category mCraftCategory = runtimeBuilder.GetCategoryByCategoryName("mcraft"); // Get mouseLook component to disable or enable looking if UI shown if(!GameObject.Find("iOSControls")) { isiOSExample = false; mouseLookX = GameObject.Find("First Person Controller").GetComponent<MouseLook>(); mouseLookY = GameObject.Find("First Person Controller/Main Camera").GetComponent<MouseLook>(); } else { isiOSExample = true; // Disale shadows for iOS GameObject.Find("Directional light").GetComponent<Light>().shadows = LightShadows.None; } StartCoroutine(GenerateMapProcedurally()); }
private void Start() { QualitySettings.shadowDistance = 100; Weapon = GameObject.Find("weapon"); isShow = false; // Get runtime builder main class runtimeBuilder = (uteRuntimeBuilder)this.gameObject.GetComponent <uteRuntimeBuilder>(); // Set Raycast distance (to not let build far away) runtimeBuilder.SetRaycastDistance(3.0f); // Set snapping to be fixed 1.0f runtimeBuilder.SetSnapOption("fixed"); // Set fixed raycast position from Screen point (form center of the screen) runtimeBuilder.SetFixedRaycastPosition(new Vector2(Screen.width / 2, Screen.height / 2)); // Get mcraft Category mCraftCategory = runtimeBuilder.GetCategoryByCategoryName("mcraft"); // Get mouseLook component to disable or enable looking if UI shown if (!GameObject.Find("iOSControls")) { isiOSExample = false; mouseLookX = GameObject.Find("First Person Controller").GetComponent <MouseLook>(); mouseLookY = GameObject.Find("First Person Controller/Main Camera").GetComponent <MouseLook>(); } else { isiOSExample = true; // Disale shadows for iOS GameObject.Find("Directional light").GetComponent <Light>().shadows = LightShadows.None; } StartCoroutine(GenerateMapProcedurally()); }