private void Start() { isShow = false; middleClickDetected = false; cameraActionDetected = false; skin = (GUISkin) Resources.Load("uteForEditor/uteUI"); // Get runtime builder main class runtimeBuilder = (uteRuntimeBuilder) this.gameObject.GetComponent<uteRuntimeBuilder>(); // List all available category names List<string> allCategoryNames = runtimeBuilder.GetListOfCategoryNames(); for(int i=0;i<allCategoryNames.Count;i++) { // Get all Category tiles and info by name allCategories.Add(runtimeBuilder.GetCategoryByCategoryName(allCategoryNames[i])); } }
private void Start() { isShow = false; middleClickDetected = false; cameraActionDetected = false; skin = (GUISkin)Resources.Load("uteForEditor/uteUI"); // Get runtime builder main class runtimeBuilder = (uteRuntimeBuilder)this.gameObject.GetComponent <uteRuntimeBuilder>(); // List all available category names List <string> allCategoryNames = runtimeBuilder.GetListOfCategoryNames(); for (int i = 0; i < allCategoryNames.Count; i++) { // Get all Category tiles and info by name allCategories.Add(runtimeBuilder.GetCategoryByCategoryName(allCategoryNames[i])); } }
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()); }