├── .gitattributes ├── .gitignore ├── .vsconfig ├── Assets ├── Automate.cs ├── Automate.cs.meta ├── CubeMap.cs ├── CubeMap.cs.meta ├── CubeState.cs ├── CubeState.cs.meta ├── PivotRotation.cs ├── PivotRotation.cs.meta ├── Prefabs.meta ├── Prefabs │ ├── Cube.prefab │ ├── Cube.prefab.meta │ ├── Kociemba.meta │ ├── Kociemba │ │ ├── K_CoordCubeBuildTables.cs │ │ ├── K_CoordCubeBuildTables.cs.meta │ │ ├── K_SearchRunTime.cs │ │ ├── K_SearchRunTime.cs.meta │ │ ├── _EADME.md │ │ ├── _EADME.md.meta │ │ ├── __CoordCube.cs │ │ ├── __CoordCube.cs.meta │ │ ├── __CubieCube.cs │ │ ├── __CubieCube.cs.meta │ │ ├── __Enums.cs │ │ ├── __Enums.cs.meta │ │ ├── __FaceCube.cs │ │ ├── __FaceCube.cs.meta │ │ ├── __Search.cs │ │ ├── __Search.cs.meta │ │ ├── __Tools.cs │ │ └── __Tools.cs.meta │ ├── Materials.meta │ ├── Materials │ │ ├── Black.mat │ │ ├── Black.mat.meta │ │ ├── Blue.mat │ │ ├── Blue.mat.meta │ │ ├── Green.mat │ │ ├── Green.mat.meta │ │ ├── Orange.mat │ │ ├── Orange.mat.meta │ │ ├── Red.mat │ │ ├── Red.mat.meta │ │ ├── White.mat │ │ ├── White.mat.meta │ │ ├── Yellow.mat │ │ ├── Yellow.mat.meta │ │ ├── mark-asthoff-Pk8t4cL2pkw-unsplash.mat │ │ └── mark-asthoff-Pk8t4cL2pkw-unsplash.mat.meta │ ├── RayStart.prefab │ ├── RayStart.prefab.meta │ ├── mark-asthoff-Pk8t4cL2pkw-unsplash.jpg │ └── mark-asthoff-Pk8t4cL2pkw-unsplash.jpg.meta ├── ReadCube.cs ├── ReadCube.cs.meta ├── Resources.meta ├── Resources │ ├── FRtoBR.bytes │ ├── FRtoBR.bytes.meta │ ├── MergeURtoULandUBtoDF.bytes │ ├── MergeURtoULandUBtoDF.bytes.meta │ ├── Slice_Flip_Prun.bytes │ ├── Slice_Flip_Prun.bytes.meta │ ├── Slice_Twist_Prun.bytes │ ├── Slice_Twist_Prun.bytes.meta │ ├── Slice_URFtoDLF_Parity_Prun.bytes │ ├── Slice_URFtoDLF_Parity_Prun.bytes.meta │ ├── Slice_URtoDF_Parity_Prun.bytes │ ├── Slice_URtoDF_Parity_Prun.bytes.meta │ ├── UBtoDF.bytes │ ├── UBtoDF.bytes.meta │ ├── URFtoDLF.bytes │ ├── URFtoDLF.bytes.meta │ ├── URtoDF.bytes │ ├── URtoDF.bytes.meta │ ├── URtoUL.bytes │ ├── URtoUL.bytes.meta │ ├── flip.bytes │ ├── flip.bytes.meta │ ├── twist.bytes │ └── twist.bytes.meta ├── RotateCube.cs ├── RotateCube.cs.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── SelectFace.cs ├── SelectFace.cs.meta ├── SolveTwoPhase.cs └── SolveTwoPhase.cs.meta ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md ├── UserSettings └── EditorUserSettings.asset └── images └── rubiks.PNG /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Never ignore Asset meta data 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Automate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class Automate : MonoBehaviour 7 | { 8 | public static List moveList = new List(); 9 | private readonly List allMoves = new List() 10 | { 11 | "U", "D", "L", "R", "F", "B", 12 | "U2", "D2", "L2", "R2", "F2", "B2", 13 | "U'", "D'", "L'", "R'", "F'", "B'" 14 | }; 15 | private CubeState cubeState; 16 | private ReadCube readCube; 17 | 18 | public InputField inShuffleSize; 19 | public Text txtErrorMessage; 20 | 21 | // Start is called before the first frame update 22 | void Start() 23 | { 24 | cubeState = FindObjectOfType(); 25 | readCube = FindObjectOfType(); 26 | } 27 | 28 | // Update is called once per frame 29 | void Update() 30 | { 31 | if(moveList.Count > 0 && !CubeState.autoRotating && CubeState.started) 32 | { 33 | DoMove(moveList[0]); 34 | 35 | moveList.Remove(moveList[0]); 36 | 37 | } 38 | } 39 | 40 | public void Shuffle() 41 | { 42 | int shuffleLen = 0; 43 | int.TryParse(inShuffleSize.text, out shuffleLen); 44 | if(shuffleLen < 10) 45 | { 46 | txtErrorMessage.text = "Error: Input Valid Data"; 47 | //shuffleLength = UnityEngine.Random.Range(10, 30); 48 | } 49 | else if (!inShuffleSize.text.Equals("") && shuffleLen > 10) 50 | { 51 | List moves = new List(); 52 | //int shuffleLength = UnityEngine.Random.Range(0, shuffleLen); 53 | for (int i = 0; i < shuffleLen; i++) 54 | { 55 | int randomMove = UnityEngine.Random.Range(0, allMoves.Count); 56 | moves.Add(allMoves[randomMove]); 57 | } 58 | moveList = moves; 59 | txtErrorMessage.text = ""; 60 | } 61 | 62 | } 63 | 64 | void DoMove(string move) 65 | { 66 | readCube.ReadState(); 67 | CubeState.autoRotating = true; 68 | if(move == "U" ) 69 | { 70 | RotateSide(cubeState.up, -90); 71 | } 72 | if (move == "U'") 73 | { 74 | RotateSide(cubeState.up, 90); 75 | } 76 | if (move == "U2") 77 | { 78 | RotateSide(cubeState.up, -180); 79 | } 80 | if (move == "D") 81 | { 82 | RotateSide(cubeState.down, -90); 83 | } 84 | if (move == "D'") 85 | { 86 | RotateSide(cubeState.down, 90); 87 | } 88 | if (move == "D2") 89 | { 90 | RotateSide(cubeState.down, -180); 91 | } 92 | if (move == "L") 93 | { 94 | RotateSide(cubeState.left, -90); 95 | } 96 | if (move == "L'") 97 | { 98 | RotateSide(cubeState.left, 90); 99 | } 100 | if (move == "L2") 101 | { 102 | RotateSide(cubeState.left, -180); 103 | } 104 | if (move == "R") 105 | { 106 | RotateSide(cubeState.right, -90); 107 | } 108 | if (move == "R'") 109 | { 110 | RotateSide(cubeState.right, 90); 111 | } 112 | if (move == "R2") 113 | { 114 | RotateSide(cubeState.right, -180); 115 | } 116 | if (move == "F") 117 | { 118 | RotateSide(cubeState.front, -90); 119 | } 120 | if (move == "F'") 121 | { 122 | RotateSide(cubeState.front, 90); 123 | } 124 | if (move == "F2") 125 | { 126 | RotateSide(cubeState.front, -180); 127 | } 128 | if (move == "B") 129 | { 130 | RotateSide(cubeState.back, -90); 131 | } 132 | if (move == "B'") 133 | { 134 | RotateSide(cubeState.back, 90); 135 | } 136 | if (move == "B2") 137 | { 138 | RotateSide(cubeState.back, -180); 139 | } 140 | 141 | } 142 | 143 | void RotateSide(List side, float angle) 144 | { 145 | PivotRotation pr = side[4].transform.parent.GetComponent(); 146 | pr.StartAutoRotate(side, angle); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /Assets/Automate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43e9b74c84263f5478481ce95d97ef5c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CubeMap.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class CubeMap : MonoBehaviour 7 | { 8 | CubeState cubeState; 9 | 10 | public Transform up; 11 | public Transform down; 12 | public Transform left; 13 | public Transform right; 14 | public Transform front; 15 | public Transform back; 16 | 17 | // Start is called before the first frame update 18 | void Start() 19 | { 20 | 21 | } 22 | 23 | // Update is called once per frame 24 | void Update() 25 | { 26 | 27 | } 28 | 29 | public void Set() 30 | { 31 | cubeState = FindObjectOfType(); 32 | 33 | UpdateMap(cubeState.front, front); 34 | UpdateMap(cubeState.back, back); 35 | UpdateMap(cubeState.up, up); 36 | UpdateMap(cubeState.down, down); 37 | UpdateMap(cubeState.left, left); 38 | UpdateMap(cubeState.right, right); 39 | } 40 | 41 | void UpdateMap(List face, Transform side) 42 | { 43 | int i = 0; 44 | foreach (Transform map in side) 45 | { 46 | if(face[0].name[0] == 'F') 47 | { 48 | map.GetComponent().color = new Color(1, 0.5f, 0, 1); 49 | } 50 | if (face[i].name[0] == 'B') 51 | { 52 | map.GetComponent().color = Color.red; 53 | } 54 | if (face[i].name[0] == 'U') 55 | { 56 | map.GetComponent().color = Color.yellow; 57 | } 58 | if (face[i].name[0] == 'D') 59 | { 60 | map.GetComponent().color = Color.white; 61 | } 62 | if (face[i].name[0] == 'L') 63 | { 64 | map.GetComponent().color = Color.green; 65 | } 66 | if (face[i].name[0] == 'R') 67 | { 68 | map.GetComponent().color = Color.blue; 69 | } 70 | i++; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/CubeMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f534ce718f730934c9b4deab17dfff6e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CubeState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CubeState : MonoBehaviour 6 | { 7 | //Sides 8 | public List front = new List(); 9 | public List back = new List(); 10 | public List up = new List(); 11 | public List down = new List(); 12 | public List left = new List(); 13 | public List right = new List(); 14 | 15 | public static bool autoRotating = false; 16 | 17 | public static bool started = false; 18 | 19 | // Start is called before the first frame update 20 | void Start() 21 | { 22 | 23 | } 24 | 25 | // Update is called once per frame 26 | void Update() 27 | { 28 | 29 | } 30 | 31 | public void PickUp(List cubeSide) 32 | { 33 | foreach(GameObject face in cubeSide) 34 | { 35 | if(face != cubeSide[4]) 36 | { 37 | face.transform.parent.transform.parent = cubeSide[4].transform.parent; 38 | } 39 | } 40 | 41 | } 42 | 43 | public void PutDown(List littleCubes, Transform pivot) 44 | { 45 | foreach(GameObject littleCube in littleCubes) 46 | { 47 | if(littleCube != littleCubes[4]) 48 | { 49 | littleCube.transform.parent.transform.parent = pivot; 50 | } 51 | } 52 | } 53 | 54 | string GetSideString(List side) 55 | { 56 | string sideString = ""; 57 | foreach(GameObject face in side) 58 | { 59 | sideString += face.name[0].ToString(); 60 | } 61 | return sideString; 62 | } 63 | 64 | public string GetStateString() 65 | { 66 | string stateString = ""; 67 | stateString += GetSideString(up); 68 | stateString += GetSideString(right); 69 | stateString += GetSideString(front); 70 | stateString += GetSideString(down); 71 | stateString += GetSideString(left); 72 | stateString += GetSideString(back); 73 | return stateString; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/CubeState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 699f7917aa6a504408ef5b0ce73ee378 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PivotRotation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class PivotRotation : MonoBehaviour 6 | { 7 | private List activeSide; 8 | private Vector3 localForward; 9 | private Vector3 mouseRef; 10 | bool dragging = false; 11 | private float senstivity = 0.4f; 12 | private Vector3 rotation; 13 | private bool autoRotating = false; 14 | private float speed = 300f; 15 | private Quaternion targetQuaternion; 16 | private ReadCube readCube; 17 | private CubeState cubeState; 18 | 19 | // Start is called before the first frame update 20 | void Start() 21 | { 22 | readCube = FindObjectOfType(); 23 | cubeState = FindObjectOfType(); 24 | } 25 | 26 | // Late Update is called once per frame at the End 27 | void LateUpdate() 28 | { 29 | if(dragging && !autoRotating) 30 | { 31 | SpinSide(activeSide); 32 | if(Input.GetMouseButtonUp(0)) 33 | { 34 | dragging = false; 35 | RotateToRightAngle(); 36 | 37 | } 38 | } 39 | if(autoRotating) 40 | { 41 | AutoRotate(); 42 | 43 | } 44 | } 45 | 46 | private void SpinSide(List side) 47 | { 48 | rotation = Vector3.zero; 49 | Vector3 mouseOffset = (Input.mousePosition - mouseRef); 50 | 51 | if(side == cubeState.front) 52 | { 53 | rotation.x = (mouseOffset.x + mouseOffset.y) * senstivity * -1; 54 | } 55 | if (side == cubeState.back) 56 | { 57 | rotation.x = (mouseOffset.x + mouseOffset.y) * senstivity * 1; 58 | 59 | } 60 | if (side == cubeState.up) 61 | { 62 | rotation.y = (mouseOffset.x + mouseOffset.y) * senstivity * 1; 63 | } 64 | if (side == cubeState.down) 65 | { 66 | rotation.y = (mouseOffset.x + mouseOffset.y) * senstivity * -1; 67 | } 68 | if (side == cubeState.left) 69 | { 70 | rotation.z = (mouseOffset.x + mouseOffset.y) * senstivity * 1; 71 | } 72 | if (side == cubeState.right) 73 | { 74 | rotation.z = (mouseOffset.x + mouseOffset.y) * senstivity * -1; 75 | } 76 | 77 | transform.Rotate(rotation, Space.Self); 78 | mouseRef = Input.mousePosition; 79 | } 80 | 81 | public void Rotate(List side) 82 | { 83 | activeSide = side; 84 | mouseRef = Input.mousePosition; 85 | dragging = true; 86 | //Create a Vector to rotate around 87 | localForward = Vector3.zero - side[4].transform.parent.transform.localPosition; 88 | 89 | } 90 | 91 | public void StartAutoRotate(List side, float angle) 92 | { 93 | cubeState.PickUp(side); 94 | Vector3 localForward = Vector3.zero - side[4].transform.parent.transform.localPosition; 95 | targetQuaternion = Quaternion.AngleAxis(angle, localForward) * transform.localRotation; 96 | activeSide = side; 97 | autoRotating = true; 98 | } 99 | 100 | public void RotateToRightAngle() 101 | { 102 | Vector3 vec = transform.localEulerAngles; 103 | 104 | vec.x = Mathf.Round(vec.x / 90) * 90; 105 | vec.y = Mathf.Round(vec.y / 90) * 90; 106 | vec.z = Mathf.Round(vec.z / 90) * 90; 107 | 108 | targetQuaternion.eulerAngles = vec; 109 | autoRotating = true; 110 | } 111 | 112 | private void AutoRotate() 113 | { 114 | dragging = false; 115 | var step = speed * Time.deltaTime; 116 | transform.localRotation = Quaternion.RotateTowards(transform.localRotation, targetQuaternion, step); 117 | if(Quaternion.Angle(transform.localRotation, targetQuaternion) <= 1) 118 | { 119 | transform.localRotation = targetQuaternion; 120 | 121 | cubeState.PutDown(activeSide, transform.parent); 122 | readCube.ReadState(); 123 | CubeState.autoRotating = false; 124 | autoRotating = false; 125 | dragging = false; 126 | 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /Assets/PivotRotation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4324666a2c23e5b428bd49d96fba9474 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0977b60042bd0846a79559e2c340fa7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cfe8dc54c6241e46828e94848c75703 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46af505956768b6418e3805e82003c77 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/K_CoordCubeBuildTables.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06d0716be9b429146b51160f275b0d98 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/K_SearchRunTime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Kociemba 4 | { 5 | public class SearchRunTime 6 | { 7 | internal static int[] ax = new int[31]; // The axis of the move 8 | internal static int[] po = new int[31]; // The power of the move 9 | 10 | internal static int[] flip = new int[31]; // phase1 coordinates 11 | internal static int[] twist = new int[31]; 12 | internal static int[] slice = new int[31]; 13 | 14 | internal static int[] parity = new int[31]; // phase2 coordinates 15 | internal static int[] URFtoDLF = new int[31]; 16 | internal static int[] FRtoBR = new int[31]; 17 | internal static int[] URtoUL = new int[31]; 18 | internal static int[] UBtoDF = new int[31]; 19 | internal static int[] URtoDF = new int[31]; 20 | 21 | internal static int[] minDistPhase1 = new int[31]; // IDA* distance do goal estimations 22 | internal static int[] minDistPhase2 = new int[31]; 23 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | // generate the solution string from the array data 25 | internal static string solutionToString(int length) 26 | { 27 | string s = ""; 28 | for (int i = 0; i < length; i++) 29 | { 30 | switch (ax[i]) 31 | { 32 | case 0: 33 | s += "U"; 34 | break; 35 | case 1: 36 | s += "R"; 37 | break; 38 | case 2: 39 | s += "F"; 40 | break; 41 | case 3: 42 | s += "D"; 43 | break; 44 | case 4: 45 | s += "L"; 46 | break; 47 | case 5: 48 | s += "B"; 49 | break; 50 | } 51 | switch (po[i]) 52 | { 53 | case 1: 54 | s += " "; 55 | break; 56 | case 2: 57 | s += "2 "; 58 | break; 59 | case 3: 60 | s += "' "; 61 | break; 62 | 63 | } 64 | } 65 | return s; 66 | } 67 | 68 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 69 | // generate the solution string from the array data including a separator between phase1 and phase2 moves 70 | internal static string solutionToString(int length, int depthPhase1) 71 | { 72 | string s = ""; 73 | for (int i = 0; i < length; i++) 74 | { 75 | switch (ax[i]) 76 | { 77 | case 0: 78 | s += "U"; 79 | break; 80 | case 1: 81 | s += "R"; 82 | break; 83 | case 2: 84 | s += "F"; 85 | break; 86 | case 3: 87 | s += "D"; 88 | break; 89 | case 4: 90 | s += "L"; 91 | break; 92 | case 5: 93 | s += "B"; 94 | break; 95 | } 96 | switch (po[i]) 97 | { 98 | case 1: 99 | s += " "; 100 | break; 101 | case 2: 102 | s += "2 "; 103 | break; 104 | case 3: 105 | s += "' "; 106 | break; 107 | 108 | } 109 | if (i == depthPhase1 - 1) 110 | { 111 | s += ". "; 112 | } 113 | } 114 | return s; 115 | } 116 | 117 | /** 118 | * Computes the solver string for a given cube. 119 | * 120 | * @param facelets 121 | * is the cube definition string, see {@link Facelet} for the format. 122 | * 123 | * @param maxDepth 124 | * defines the maximal allowed maneuver length. For random cubes, a maxDepth of 21 usually will return a 125 | * solution in less than 0.5 seconds. With a maxDepth of 20 it takes a few seconds on average to find a 126 | * solution, but it may take much longer for specific cubes. 127 | * 128 | *@param timeOut 129 | * defines the maximum computing time of the method in seconds. If it does not return with a solution, it returns with 130 | * an error code. 131 | * 132 | * @param useSeparator 133 | * determines if a " . " separates the phase1 and phase2 parts of the solver string like in F' R B R L2 F . 134 | * U2 U D for example.
135 | * @return The solution string or an error code:
136 | * Error 1: There is not exactly one facelet of each colour
137 | * Error 2: Not all 12 edges exist exactly once
138 | * Error 3: Flip error: One edge has to be flipped
139 | * Error 4: Not all corners exist exactly once
140 | * Error 5: Twist error: One corner has to be twisted
141 | * Error 6: Parity error: Two corners or two edges have to be exchanged
142 | * Error 7: No solution exists for the given maxDepth
143 | * Error 8: Timeout, no solution within given time 144 | */ 145 | public static string solution(string facelets, out string info, int maxDepth= 22, long timeOut = 6000, bool useSeparator = false, bool buildTables = false ) 146 | { 147 | 148 | info = "Warning, this solution builds tables at run time which is very slow. This will find a solution, however it is reccomended to use the K_SearchRunTime class only to create a local copy of the tables, then use the K_Search class to search for solutions instead."; 149 | if (facelets == "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB") 150 | { 151 | return ""; 152 | } 153 | int s; 154 | // +++++++++++++++++++++check for wrong input +++++++++++++++++++++++++++++ 155 | int[] count = new int[6]; 156 | try 157 | { 158 | for (int i = 0; i < 54; i++) 159 | { 160 | count[(int)CubeColor.Parse(typeof(CubeColor), facelets.Substring(i, 1))]++; 161 | } 162 | } 163 | catch (Exception) 164 | { 165 | return "Error 1"; 166 | } 167 | for (int i = 0; i < 6; i++) 168 | { 169 | if (count[i] != 9) 170 | { 171 | return "Error 1"; 172 | } 173 | } 174 | 175 | FaceCube fc = new FaceCube(facelets); 176 | CubieCube cc = fc.toCubieCube(); 177 | if ((s = cc.verify()) != 0) 178 | { 179 | return "Error " + Math.Abs(s); 180 | } 181 | // +++++++++++++++++++++++ initialization +++++++++++++++++++++++++++++++++ 182 | CoordCubeBuildTables c = new CoordCubeBuildTables(cc, buildTables); 183 | //return "lol"; 184 | 185 | po[0] = 0; 186 | ax[0] = 0; 187 | flip[0] = c.flip; 188 | twist[0] = c.twist; 189 | parity[0] = c.parity; 190 | slice[0] = c.FRtoBR / 24; 191 | URFtoDLF[0] = c.URFtoDLF; 192 | FRtoBR[0] = c.FRtoBR; 193 | URtoUL[0] = c.URtoUL; 194 | UBtoDF[0] = c.UBtoDF; 195 | minDistPhase1[1] = 1; // else failure for depth=1, n=0 196 | int mv = 0, n = 0; 197 | bool busy = false; 198 | int depthPhase1 = 1; 199 | long tStart = DateTimeHelper.CurrentUnixTimeMillis(); 200 | 201 | // +++++++++++++++++++ Main loop ++++++++++++++++++++++++++++++++++++++++++ 202 | do 203 | { 204 | do 205 | { 206 | if ((depthPhase1 - n > minDistPhase1[n + 1]) && !busy) 207 | { 208 | 209 | if (ax[n] == 0 || ax[n] == 3) // Initialize next move 210 | { 211 | ax[++n] = 1; 212 | } 213 | else 214 | { 215 | ax[++n] = 0; 216 | } 217 | po[n] = 1; 218 | } 219 | else if (++po[n] > 3) 220 | { 221 | do 222 | { // increment axis 223 | if (++ax[n] > 5) 224 | { 225 | 226 | if (DateTimeHelper.CurrentUnixTimeMillis() - tStart > timeOut << 10) 227 | { 228 | return "Error 8"; 229 | } 230 | 231 | if (n == 0) 232 | { 233 | if (depthPhase1 >= maxDepth) 234 | { 235 | return "Error 7"; 236 | } 237 | else 238 | { 239 | depthPhase1++; 240 | ax[n] = 0; 241 | po[n] = 1; 242 | busy = false; 243 | break; 244 | } 245 | } 246 | else 247 | { 248 | n--; 249 | busy = true; 250 | break; 251 | } 252 | 253 | } 254 | else 255 | { 256 | po[n] = 1; 257 | busy = false; 258 | } 259 | } while (n != 0 && (ax[n - 1] == ax[n] || ax[n - 1] - 3 == ax[n])); 260 | } 261 | else 262 | { 263 | busy = false; 264 | } 265 | } while (busy); 266 | 267 | // +++++++++++++ compute new coordinates and new minDistPhase1 ++++++++++ 268 | // if minDistPhase1 =0, the H subgroup is reached 269 | mv = 3 * ax[n] + po[n] - 1; 270 | flip[n + 1] = CoordCubeBuildTables.flipMove[flip[n],mv]; 271 | twist[n + 1] = CoordCubeBuildTables.twistMove[twist[n],mv]; 272 | slice[n + 1] = CoordCubeBuildTables.FRtoBR_Move[slice[n] * 24,mv] / 24; 273 | minDistPhase1[n + 1] = Math.Max(CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_Flip_Prun, CoordCubeBuildTables.N_SLICE1 * flip[n + 1] + slice[n + 1]), CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_Twist_Prun, CoordCubeBuildTables.N_SLICE1 * twist[n + 1] + slice[n + 1])); 274 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 275 | 276 | if (minDistPhase1[n + 1] == 0 && n >= depthPhase1 - 5) 277 | { 278 | minDistPhase1[n + 1] = 10; // instead of 10 any value >5 is possible 279 | if (n == depthPhase1 - 1 && (s = totalDepth(depthPhase1, maxDepth)) >= 0) 280 | { 281 | if (s == depthPhase1 || (ax[depthPhase1 - 1] != ax[depthPhase1] && ax[depthPhase1 - 1] != ax[depthPhase1] + 3)) 282 | { 283 | return useSeparator ? solutionToString(s, depthPhase1) : solutionToString(s); 284 | } 285 | } 286 | 287 | } 288 | } while (true); 289 | } 290 | 291 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 292 | // Apply phase2 of algorithm and return the combined phase1 and phase2 depth. In phase2, only the moves 293 | // U,D,R2,F2,L2 and B2 are allowed. 294 | internal static int totalDepth(int depthPhase1, int maxDepth) 295 | { 296 | int mv = 0, d1 = 0, d2 = 0; 297 | int maxDepthPhase2 = Math.Min(10, maxDepth - depthPhase1); // Allow only max 10 moves in phase2 298 | for (int i = 0; i < depthPhase1; i++) 299 | { 300 | mv = 3 * ax[i] + po[i] - 1; 301 | URFtoDLF[i + 1] = CoordCubeBuildTables.URFtoDLF_Move[URFtoDLF[i], mv]; 302 | FRtoBR[i + 1] = CoordCubeBuildTables.FRtoBR_Move[FRtoBR[i], mv]; 303 | parity[i + 1] = CoordCubeBuildTables.parityMove[parity[i]][mv]; 304 | } 305 | 306 | if ((d1 = CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_URFtoDLF_Parity_Prun, (CoordCubeBuildTables.N_SLICE2 * URFtoDLF[depthPhase1] + FRtoBR[depthPhase1]) * 2 + parity[depthPhase1])) > maxDepthPhase2) 307 | { 308 | return -1; 309 | } 310 | 311 | for (int i = 0; i < depthPhase1; i++) 312 | { 313 | mv = 3 * ax[i] + po[i] - 1; 314 | URtoUL[i + 1] = CoordCubeBuildTables.URtoUL_Move[URtoUL[i], mv]; 315 | UBtoDF[i + 1] = CoordCubeBuildTables.UBtoDF_Move[UBtoDF[i], mv]; 316 | } 317 | URtoDF[depthPhase1] = CoordCubeBuildTables.MergeURtoULandUBtoDF[URtoUL[depthPhase1],UBtoDF[depthPhase1]]; 318 | 319 | if ((d2 = CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_URtoDF_Parity_Prun, (CoordCubeBuildTables.N_SLICE2 * URtoDF[depthPhase1] + FRtoBR[depthPhase1]) * 2 + parity[depthPhase1])) > maxDepthPhase2) 320 | { 321 | return -1; 322 | } 323 | 324 | if ((minDistPhase2[depthPhase1] = Math.Max(d1, d2)) == 0) // already solved 325 | { 326 | return depthPhase1; 327 | } 328 | 329 | // now set up search 330 | 331 | int depthPhase2 = 1; 332 | int n = depthPhase1; 333 | bool busy = false; 334 | po[depthPhase1] = 0; 335 | ax[depthPhase1] = 0; 336 | minDistPhase2[n + 1] = 1; // else failure for depthPhase2=1, n=0 337 | // +++++++++++++++++++ end initialization +++++++++++++++++++++++++++++++++ 338 | do 339 | { 340 | do 341 | { 342 | if ((depthPhase1 + depthPhase2 - n > minDistPhase2[n + 1]) && !busy) 343 | { 344 | 345 | if (ax[n] == 0 || ax[n] == 3) // Initialize next move 346 | { 347 | ax[++n] = 1; 348 | po[n] = 2; 349 | } 350 | else 351 | { 352 | ax[++n] = 0; 353 | po[n] = 1; 354 | } 355 | } 356 | else if ((ax[n] == 0 || ax[n] == 3) ? (++po[n] > 3) : ((po[n] = po[n] + 2) > 3)) 357 | { 358 | do 359 | { // increment axis 360 | if (++ax[n] > 5) 361 | { 362 | if (n == depthPhase1) 363 | { 364 | if (depthPhase2 >= maxDepthPhase2) 365 | { 366 | return -1; 367 | } 368 | else 369 | { 370 | depthPhase2++; 371 | ax[n] = 0; 372 | po[n] = 1; 373 | busy = false; 374 | break; 375 | } 376 | } 377 | else 378 | { 379 | n--; 380 | busy = true; 381 | break; 382 | } 383 | 384 | } 385 | else 386 | { 387 | if (ax[n] == 0 || ax[n] == 3) 388 | { 389 | po[n] = 1; 390 | } 391 | else 392 | { 393 | po[n] = 2; 394 | } 395 | busy = false; 396 | } 397 | } while (n != depthPhase1 && (ax[n - 1] == ax[n] || ax[n - 1] - 3 == ax[n])); 398 | } 399 | else 400 | { 401 | busy = false; 402 | } 403 | } while (busy); 404 | // +++++++++++++ compute new coordinates and new minDist ++++++++++ 405 | mv = 3 * ax[n] + po[n] - 1; 406 | 407 | URFtoDLF[n + 1] = CoordCubeBuildTables.URFtoDLF_Move[URFtoDLF[n], mv]; 408 | FRtoBR[n + 1] = CoordCubeBuildTables.FRtoBR_Move[FRtoBR[n],mv]; 409 | parity[n + 1] = CoordCubeBuildTables.parityMove[parity[n]][mv]; 410 | URtoDF[n + 1] = CoordCubeBuildTables.URtoDF_Move[URtoDF[n], mv]; 411 | 412 | minDistPhase2[n + 1] = Math.Max(CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_URtoDF_Parity_Prun, (CoordCubeBuildTables.N_SLICE2 * URtoDF[n + 1] + FRtoBR[n + 1]) * 2 + parity[n + 1]), CoordCubeBuildTables.getPruning(CoordCubeBuildTables.Slice_URFtoDLF_Parity_Prun, (CoordCubeBuildTables.N_SLICE2 * URFtoDLF[n + 1] + FRtoBR[n + 1]) * 2 + parity[n + 1])); 413 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 414 | 415 | } while (minDistPhase2[n + 1] != 0); 416 | return depthPhase1 + depthPhase2; 417 | } 418 | } 419 | } -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/K_SearchRunTime.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f542f9bf8228464889b5500e4c6cb7e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/_EADME.md: -------------------------------------------------------------------------------- 1 | # C# Kociemba Two-Phase Solver for Unity 2 | 3 | This is a C# port of the [Two-Phase-Algorithm Java package](http://kociemba.org/cube.htm) written by Herbert Kociemba. 4 | 5 | All credit for this solution goes to him. 6 | 7 | This port was created to allow the code to work with the Unity Game Engine. 8 | I have made a couple of small modifications (to store the built tables and pass out some info) but, for the most part, all comments remain intact and this package can be used with the original documentation. 9 | 10 | An [alternative C# implementation](https://github.com/tremwil/TwoPhaseSolver) exists that accepts a move list, instead of a searchString, as an input by GitHub user Tremwill. 11 | 12 | # Using the package 13 | 14 | ** Note: If using with Unity, switch to the Unity branch! This will allow tables to be used in WebGL ** 15 | 16 | ## Define the scope 17 | 18 | using Kociemba; 19 | 20 | ## Preparing the search string 21 | 22 | Diagam of cube map from Kociemba's original documention: 23 | 24 | |************| 25 | |*U1**U2**U3*| 26 | |************| 27 | |*U4**U5**U6*| 28 | |************| 29 | |*U7**U8**U9*| 30 | ************|************|************|************| 31 | *L1**L2**L3*|*F1**F2**F3*|*R1**R2**F3*|*B1**B2**B3*| 32 | ************|************|************|************| 33 | *L4**L5**L6*|*F4**F5**F6*|*R4**R5**R6*|*B4**B5**B6*| 34 | ************|************|************|************| 35 | *L7**L8**L9*|*F7**F8**F9*|*R7**R8**R9*|*B7**B8**B9*| 36 | ************|************|************|************| 37 | |*D1**D2**D3*| 38 | |************| 39 | |*D4**D5**D6*| 40 | |************| 41 | |*D7**D8**D9*| 42 | |************| 43 | 44 | 45 | The searchString need to be ordered by sides Up Right Front Down Left Back with the order of the characters in the string, matching the order as outlined in the diagram. 46 | For example, a solved searchString would be: 47 | 48 | string searchString= "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"; 49 | 50 | This searchString has had 90 degree clockwise rotation of the front face applied to it: 51 | 52 | string searchString= "UUUUUULLLURRURRURRFFFFFFFFFRRRDDDDDDLLDLLDLLDBBBBBBBBB"; 53 | 54 | 55 | 56 | 57 | 58 | ## SearchRunTime 59 | (The slow one) 60 | 61 | Initial search takes a while (over 30 seconds on a gaming PC) as the search tables are built at runtime. After the tables are loaded into memory, subsequent searches take milliseconds. 62 | 63 | public static string solution( 64 | string facelets, 65 | out string info, 66 | int maxDepth= 22, 67 | long timeOut = 6000, 68 | bool useSeparator = false, 69 | bool buildTables = false 70 | ) 71 | Example use: 72 | 73 | This method accepts a string of a scrambled cube as an input and outputs a string of the moves that would solve the scramble string. 74 | It requires an additional string to pass out information. 75 | 76 | If buildTables is set to true, it will generate the tables necessary for using the alternative Search class. 77 | 78 | The following file tree structure will be generated if it does not exist already: 79 | Assets/Resources/Tables/ 80 | 81 | 82 | string info = ""; 83 | string solution = SearchRunTime.solution(searchString, out info, buildTables: true); 84 | 85 | 86 | 87 | ## Search 88 | 89 | (The fast one) 90 | 91 | A second or two to read the tables into memory then solves take milliseconds. 92 | This method requires tables to exist. They can be built by the alternative SearchRunTime class. 93 | 94 | public static string solution( 95 | string facelets, 96 | out string info, 97 | int maxDepth = 22, 98 | long timeOut = 6000, 99 | bool useSeparator = false 100 | ) 101 | 102 | Example use: 103 | 104 | This accepts a string of a scrambled cube as an input and outputs a string of the moves that would solve the scramble string. 105 | It requires an additional string to pass out information. 106 | 107 | If buildTables is set to true, it will generate the tables necessary for using the alternative Search class. 108 | 109 | string info = ""; 110 | string solution = Search.solution(searchString, out info); 111 | 112 | 113 | # Notes 114 | 115 | Setting the maxDepth int lower than 20 can prevent solves being found and decreasing from 22 can cause the searches to take longer. If increased they become faster. 22 or 23 seem like the sweet spot for speed and low move number. 116 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/_EADME.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b75728a2ea580704b98d7786fa7fa5c6 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__CoordCube.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Kociemba 4 | { 5 | internal class CoordCube 6 | { 7 | 8 | internal const short N_TWIST = 2187; // 3^7 possible corner orientations 9 | internal const short N_FLIP = 2048; // 2^11 possible edge flips 10 | internal const short N_SLICE1 = 495; // 12 choose 4 possible positions of FR,FL,BL,BR edges 11 | internal const short N_SLICE2 = 24; // 4! permutations of FR,FL,BL,BR edges in phase2 12 | internal const short N_PARITY = 2; // 2 possible corner parities 13 | internal const short N_URFtoDLF = 20160; // 8!/(8-6)! permutation of URF,UFL,ULB,UBR,DFR,DLF corners 14 | internal const short N_FRtoBR = 11880; // 12!/(12-4)! permutation of FR,FL,BL,BR edges 15 | internal const short N_URtoUL = 1320; // 12!/(12-3)! permutation of UR,UF,UL edges 16 | internal const short N_UBtoDF = 1320; // 12!/(12-3)! permutation of UB,DR,DF edges 17 | internal const short N_URtoDF = 20160; // 8!/(8-6)! permutation of UR,UF,UL,UB,DR,DF edges in phase2 18 | 19 | internal const int N_URFtoDLB = 40320; // 8! permutations of the corners 20 | internal const int N_URtoBR = 479001600; // 8! permutations of the corners 21 | 22 | internal const short N_MOVE = 18; 23 | 24 | // All coordinates are 0 for a solved cube except for UBtoDF, which is 114 25 | internal short twist; 26 | internal short flip; 27 | internal short parity; 28 | internal short FRtoBR; 29 | internal short URFtoDLF; 30 | internal short URtoUL; 31 | internal short UBtoDF; 32 | internal int URtoDF; 33 | 34 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 35 | // Generate a CoordCube from a CubieCube 36 | internal CoordCube(CubieCube c, DateTime startTime, string currentTime, out string info) 37 | { 38 | info = currentTime; 39 | twist = c.getTwist(); 40 | 41 | flip = c.getFlip(); 42 | parity = c.cornerParity(); 43 | FRtoBR = c.getFRtoBR(); 44 | 45 | URFtoDLF = c.getURFtoDLF(); 46 | URtoUL = c.getURtoUL(); 47 | UBtoDF = c.getUBtoDF(); 48 | URtoDF = c.getURtoDF();// only needed in phase2 49 | info += "[ Finished Initialiation: " + String.Format(@"{0:mm\:ss\.ffff}", (DateTime.Now - startTime)) + " ] "; 50 | 51 | } 52 | 53 | // A move on the coordinate level 54 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 55 | internal virtual void move(int m) 56 | { 57 | twist = twistMove[twist, m]; 58 | flip = flipMove[flip, m]; 59 | parity = parityMove[parity][m]; 60 | FRtoBR = FRtoBR_Move[FRtoBR, m]; 61 | URFtoDLF = URFtoDLF_Move[URFtoDLF, m]; 62 | URtoUL = URtoUL_Move[URtoUL, m]; 63 | UBtoDF = UBtoDF_Move[UBtoDF, m]; 64 | if (URtoUL < 336 && UBtoDF < 336) // updated only if UR,UF,UL,UB,DR,DF 65 | { 66 | // are not in UD-slice 67 | URtoDF = MergeURtoULandUBtoDF[URtoUL, UBtoDF]; 68 | } 69 | } 70 | 71 | 72 | // ******************************************Phase 1 move tables***************************************************** 73 | 74 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 75 | // Move table for the twists of the corners 76 | // twist < 2187 in phase 2. 77 | // twist = 0 in phase 2. 78 | internal static short[,] twistMove = CoordCubeTables.twist; 79 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 80 | // Move table for the flips of the edges 81 | // flip < 2048 in phase 1 82 | // flip = 0 in phase 2. 83 | internal static short[,] flipMove = CoordCubeTables.flip; 84 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 85 | // Parity of the corner permutation. This is the same as the parity for the edge permutation of a valid cube. 86 | // parity has values 0 and 1 87 | internal static short[][] parityMove = new short[][] 88 | { 89 | new short[] {1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1}, 90 | new short[] {0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0} 91 | }; 92 | 93 | 94 | // ***********************************Phase 1 and 2 movetable******************************************************** 95 | 96 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 97 | // Move table for the four UD-slice edges FR, FL, Bl and BR 98 | // FRtoBRMove < 11880 in phase 1 99 | // FRtoBRMove < 24 in phase 2 100 | // FRtoBRMove = 0 for solved cube 101 | internal static short[,] FRtoBR_Move = CoordCubeTables.FRtoBR; 102 | 103 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 104 | // Move table for permutation of six corners. The positions of the DBL and DRB corners are determined by the parity. 105 | // URFtoDLF < 20160 in phase 1 106 | // URFtoDLF < 20160 in phase 2 107 | // URFtoDLF = 0 for solved cube. 108 | internal static short[,] URFtoDLF_Move = CoordCubeTables.URFtoDLF; 109 | 110 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 111 | // Move table for the permutation of six U-face and D-face edges in phase2. The positions of the DL and DB edges are 112 | // determined by the parity. 113 | // URtoDF < 665280 in phase 1 114 | // URtoDF < 20160 in phase 2 115 | // URtoDF = 0 for solved cube. 116 | internal static short[,] URtoDF_Move = CoordCubeTables.URtoDF; 117 | 118 | // **************************helper move tables to compute URtoDF for the beginning of phase2************************ 119 | 120 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 121 | // Move table for the three edges UR,UF and UL in phase1. 122 | internal static short[,] URtoUL_Move = CoordCubeTables.URtoUL; 123 | 124 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 125 | // Move table for the three edges UB,DR and DF in phase1. 126 | internal static short[,] UBtoDF_Move = CoordCubeTables.UBtoDF; 127 | 128 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 129 | // Table to merge the coordinates of the UR,UF,UL and UB,DR,DF edges at the beginning of phase2 130 | internal static short[,] MergeURtoULandUBtoDF = CoordCubeTables.MergeURtoULandUBtoDF; 131 | 132 | 133 | // ****************************************Pruning tables for the search********************************************* 134 | 135 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 136 | // Pruning table for the permutation of the corners and the UD-slice edges in phase2. 137 | // The pruning table entries give a lower estimation for the number of moves to reach the solved cube. 138 | internal static sbyte[] Slice_URFtoDLF_Parity_Prun = CoordCubeTables.Slice_URFtoDLF_Parity_Prun; 139 | 140 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 141 | // Pruning table for the permutation of the edges in phase2. 142 | // The pruning table entries give a lower estimation for the number of moves to reach the solved cube. 143 | internal static sbyte[] Slice_URtoDF_Parity_Prun = CoordCubeTables.Slice_URtoDF_Parity_Prun; 144 | 145 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 146 | // Pruning table for the twist of the corners and the position (not permutation) of the UD-slice edges in phase1 147 | // The pruning table entries give a lower estimation for the number of moves to reach the H-subgroup. 148 | internal static sbyte[] Slice_Twist_Prun = CoordCubeTables.Slice_Twist_Prun; 149 | 150 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 151 | // Pruning table for the flip of the edges and the position (not permutation) of the UD-slice edges in phase1 152 | // The pruning table entries give a lower estimation for the number of moves to reach the H-subgroup. 153 | internal static sbyte[] Slice_Flip_Prun = CoordCubeTables.Slice_Flip_Prun; 154 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 155 | 156 | 157 | // Set pruning value in table. Two values are stored in one byte. 158 | internal static void setPruning(sbyte[] table, int index, sbyte value) 159 | { 160 | if ((index & 1) == 0) 161 | { 162 | table[index / 2] &= unchecked((sbyte)(0xf0 | value)); 163 | } 164 | else 165 | { 166 | table[index / 2] &= (sbyte)(0x0f | (value << 4)); 167 | } 168 | } 169 | 170 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 171 | // Extract pruning value 172 | internal static sbyte getPruning(sbyte[] table, int index) 173 | { 174 | if ((index & 1) == 0) 175 | { 176 | return (sbyte)(table[index / 2] & 0x0f); 177 | } 178 | else 179 | { 180 | return (sbyte)((int)((uint)(table[index / 2] & 0xf0) >> 4)); 181 | } 182 | } 183 | } 184 | 185 | public static class CoordCubeTables 186 | { 187 | 188 | // Movement 189 | public static readonly short[,] twist = Tools.DeserializeTable("twist"); 190 | public static readonly short[,] flip = Tools.DeserializeTable("flip"); 191 | public static readonly short[,] FRtoBR = Tools.DeserializeTable("FRtoBR"); 192 | public static readonly short[,] URFtoDLF = Tools.DeserializeTable("URFtoDLF"); 193 | public static readonly short[,] URtoDF = Tools.DeserializeTable("URtoDF"); 194 | public static readonly short[,] URtoUL = Tools.DeserializeTable("URtoUL"); 195 | public static readonly short[,] UBtoDF = Tools.DeserializeTable("UBtoDF"); 196 | public static readonly short[,] MergeURtoULandUBtoDF = Tools.DeserializeTable("MergeURtoULandUBtoDF"); 197 | 198 | //Prune 199 | public static readonly sbyte[] Slice_URFtoDLF_Parity_Prun = Tools.DeserializeSbyteArray("Slice_URFtoDLF_Parity_Prun"); 200 | public static readonly sbyte[] Slice_URtoDF_Parity_Prun = Tools.DeserializeSbyteArray("Slice_URtoDF_Parity_Prun"); 201 | public static readonly sbyte[] Slice_Twist_Prun = Tools.DeserializeSbyteArray("Slice_Twist_Prun"); 202 | public static readonly sbyte[] Slice_Flip_Prun = Tools.DeserializeSbyteArray("Slice_Flip_Prun"); 203 | 204 | } 205 | 206 | 207 | } 208 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__CoordCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7048db6e64233b438fdfa6af1cda7eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__CubieCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 897a0881fd9ab644387d43e0bb9408fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Enums.cs: -------------------------------------------------------------------------------- 1 | namespace Kociemba 2 | { 3 | /** 4 | *
 5 |      * The names of the facelet positions of the cube
 6 |      *             |************|
 7 |      *             |*U1**U2**U3*|
 8 |      *             |************|
 9 |      *             |*U4**U5**U6*|
10 |      *             |************|
11 |      *             |*U7**U8**U9*|
12 |      *             |************|
13 |      * ************|************|************|************|
14 |      * *L1**L2**L3*|*F1**F2**F3*|*R1**R2**F3*|*B1**B2**B3*|
15 |      * ************|************|************|************|
16 |      * *L4**L5**L6*|*F4**F5**F6*|*R4**R5**R6*|*B4**B5**B6*|
17 |      * ************|************|************|************|
18 |      * *L7**L8**L9*|*F7**F8**F9*|*R7**R8**R9*|*B7**B8**B9*|
19 |      * ************|************|************|************|
20 |      *             |************|
21 |      *             |*D1**D2**D3*|
22 |      *             |************|
23 |      *             |*D4**D5**D6*|
24 |      *             |************|
25 |      *             |*D7**D8**D9*|
26 |      *             |************|
27 |      * 
28 | * 29 | *A cube definition string "UBL..." means for example: In position U1 we have the U-color, in position U2 we have the 30 | * B-color, in position U3 we have the L color etc. according to the order U1, U2, U3, U4, U5, U6, U7, U8, U9, R1, R2, 31 | * R3, R4, R5, R6, R7, R8, R9, F1, F2, F3, F4, F5, F6, F7, F8, F9, D1, D2, D3, D4, D5, D6, D7, D8, D9, L1, L2, L3, L4, 32 | * L5, L6, L7, L8, L9, B1, B2, B3, B4, B5, B6, B7, B8, B9 of the enum constants. 33 | */ 34 | public enum Facelet 35 | { 36 | U1, U2, U3, U4, U5, U6, U7, U8, U9, R1, R2, R3, R4, R5, R6, R7, R8, R9, F1, F2, F3, F4, F5, F6, F7, F8, F9, D1, D2, D3, D4, D5, D6, D7, D8, D9, L1, L2, L3, L4, L5, L6, L7, L8, L9, B1, B2, B3, B4, B5, B6, B7, B8, B9 37 | } 38 | 39 | //++++++++++++++++++++++++++++++ Names the colors of the cube facelets ++++++++++++++++++++++++++++++++++++++++++++++++ 40 | public enum CubeColor 41 | { 42 | U, R, F, D, L, B 43 | } 44 | 45 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 46 | //The names of the corner positions of the cube. Corner URF e.g., has an U(p), a R(ight) and a F(ront) facelet 47 | public enum Corner 48 | { 49 | URF, UFL, ULB, UBR, DFR, DLF, DBL, DRB 50 | } 51 | 52 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 53 | //Then names of the edge positions of the cube. Edge UR e.g., has an U(p) and R(ight) facelet. 54 | public enum Edge 55 | { 56 | UR, UF, UL, UB, DR, DF, DL, DB, FR, FL, BL, BR 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Enums.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7ea14f72f2034141bbda995a84b4f4b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__FaceCube.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | 4 | namespace Kociemba 5 | { 6 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 | //Cube on the facelet level 8 | public class FaceCube 9 | { 10 | public CubeColor[] f = new CubeColor[54]; 11 | 12 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 13 | // Map the corner positions to facelet positions. cornerFacelet[URF.ordinal()][0] e.g. gives the position of the 14 | // facelet in the URF corner position, which defines the orientation.
15 | // cornerFacelet[URF.ordinal()][1] and cornerFacelet[URF.ordinal()][2] give the position of the other two facelets 16 | // of the URF corner (clockwise). 17 | public static Facelet[][] cornerFacelet = new Facelet[][] { 18 | new Facelet[] { Facelet.U9, Facelet.R1, Facelet.F3 }, 19 | new Facelet[] { Facelet.U7, Facelet.F1, Facelet.L3 }, 20 | new Facelet[] { Facelet.U1, Facelet.L1, Facelet.B3 }, 21 | new Facelet[] { Facelet.U3, Facelet.B1, Facelet.R3 }, 22 | new Facelet[] { Facelet.D3, Facelet.F9, Facelet.R7 }, 23 | new Facelet[] { Facelet.D1, Facelet.L9, Facelet.F7 }, 24 | new Facelet[] { Facelet.D7, Facelet.B9, Facelet.L7 }, 25 | new Facelet[] { Facelet.D9, Facelet.R9, Facelet.B7 } 26 | }; 27 | 28 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 29 | // Map the edge positions to facelet positions. edgeFacelet[UR.ordinal()][0] e.g. gives the position of the facelet in 30 | // the UR edge position, which defines the orientation.
31 | // edgeFacelet[UR.ordinal()][1] gives the position of the other facelet 32 | public static Facelet[][] edgeFacelet = new Facelet[][]{ 33 | new Facelet[] { Facelet.U6, Facelet.R2 }, 34 | new Facelet[] { Facelet.U8, Facelet.F2 }, 35 | new Facelet[] { Facelet.U4, Facelet.L2 }, 36 | new Facelet[] { Facelet.U2, Facelet.B2 }, 37 | new Facelet[] { Facelet.D6, Facelet.R8 }, 38 | new Facelet[] { Facelet.D2, Facelet.F8 }, 39 | new Facelet[] { Facelet.D4, Facelet.L8 }, 40 | new Facelet[] { Facelet.D8, Facelet.B8 }, 41 | new Facelet[] { Facelet.F6, Facelet.R4 }, 42 | new Facelet[] { Facelet.F4, Facelet.L6 }, 43 | new Facelet[] { Facelet.B6, Facelet.L4 }, 44 | new Facelet[] { Facelet.B4, Facelet.R6 } 45 | }; 46 | 47 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 48 | // Map the corner positions to facelet CubeColors. 49 | public static CubeColor[][] cornerColor = new CubeColor[][]{ 50 | new CubeColor[] { CubeColor.U, CubeColor.R, CubeColor.F }, 51 | new CubeColor[] { CubeColor.U, CubeColor.F, CubeColor.L }, 52 | new CubeColor[] { CubeColor.U, CubeColor.L, CubeColor.B }, 53 | new CubeColor[] { CubeColor.U, CubeColor.B, CubeColor.R }, 54 | new CubeColor[] { CubeColor.D, CubeColor.F, CubeColor.R }, 55 | new CubeColor[] { CubeColor.D, CubeColor.L, CubeColor.F }, 56 | new CubeColor[] { CubeColor.D, CubeColor.B, CubeColor.L }, 57 | new CubeColor[] { CubeColor.D, CubeColor.R, CubeColor.B } 58 | }; 59 | 60 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 61 | // Map the edge positions to facelet CubeColors. 62 | public static CubeColor[][] edgeColor = new CubeColor[][]{ 63 | new CubeColor[] { CubeColor.U, CubeColor.R }, 64 | new CubeColor[] { CubeColor.U, CubeColor.F }, 65 | new CubeColor[] { CubeColor.U, CubeColor.L }, 66 | new CubeColor[] { CubeColor.U, CubeColor.B }, 67 | new CubeColor[] { CubeColor.D, CubeColor.R }, 68 | new CubeColor[] { CubeColor.D, CubeColor.F }, 69 | new CubeColor[] { CubeColor.D, CubeColor.L }, 70 | new CubeColor[] { CubeColor.D, CubeColor.B }, 71 | new CubeColor[] { CubeColor.F, CubeColor.R }, 72 | new CubeColor[] { CubeColor.F, CubeColor.L }, 73 | new CubeColor[] { CubeColor.B, CubeColor.L }, 74 | new CubeColor[] { CubeColor.B, CubeColor.R } 75 | }; 76 | 77 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 78 | public FaceCube() 79 | { 80 | string s = "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"; 81 | for (int i = 0; i < 54; i++) 82 | { 83 | CubeColor col = (CubeColor)Enum.Parse(typeof(CubeColor), s[i].ToString()); 84 | f[i] = col; 85 | } 86 | 87 | } 88 | 89 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 90 | // Construct a facelet cube from a string 91 | public FaceCube(string cubeString) 92 | { 93 | for (int i = 0; i < cubeString.Length; i++) 94 | { 95 | CubeColor col = (CubeColor)Enum.Parse(typeof(CubeColor), cubeString[i].ToString()); 96 | f[i] = col; 97 | } 98 | 99 | } 100 | 101 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 102 | // Gives string representation of a facelet cube 103 | public string to_fc_String() 104 | { 105 | string s = ""; 106 | for (int i = 0; i < 54; i++) 107 | s += f[i].ToString(); 108 | return s; 109 | } 110 | 111 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 112 | // Gives CubieCube representation of a faceletcube 113 | public CubieCube toCubieCube() 114 | { 115 | byte ori; 116 | CubieCube ccRet = new CubieCube(); 117 | for (int i = 0; i < 8; i++) 118 | ccRet.cp[i] = Corner.URF;// invalidate corners 119 | for (int i = 0; i < 12; i++) 120 | ccRet.ep[i] = Edge.UR;// and edges 121 | CubeColor col1, col2; 122 | foreach (Corner i in (Corner[])Enum.GetValues(typeof(Corner))) 123 | { 124 | // get the CubeColors of the cubie at corner i, starting with U/D 125 | for (ori = 0; ori < 3; ori++) 126 | if (f[(int)cornerFacelet[(int)i][ori]] == CubeColor.U || f[(int)cornerFacelet[(int)i][ori]] == CubeColor.D) 127 | break; 128 | col1 = f[(int)cornerFacelet[(int)i][(ori + 1) % 3]]; 129 | col2 = f[(int)cornerFacelet[(int)i][(ori + 2) % 3]]; 130 | 131 | foreach (Corner j in (Corner[])Enum.GetValues(typeof(Corner))) 132 | { 133 | if (col1 == cornerColor[(int)j][1] && col2 == cornerColor[(int)j][2]) 134 | { 135 | // in cornerposition i we have cornercubie j 136 | ccRet.cp[(int)i] = j; 137 | ccRet.co[(int)i] = (byte)(ori % 3); 138 | break; 139 | } 140 | } 141 | } 142 | foreach (Edge i in (Edge[])Enum.GetValues(typeof(Edge))) 143 | foreach (Edge j in (Edge[])Enum.GetValues(typeof(Edge))) 144 | { 145 | if (f[(int)edgeFacelet[(int)i][0]] == edgeColor[(int)j][0] 146 | && f[(int)edgeFacelet[(int)i][1]] == edgeColor[(int)j][1]) 147 | { 148 | ccRet.ep[(int)i] = j; 149 | ccRet.eo[(int)i] = 0; 150 | break; 151 | } 152 | if (f[(int)edgeFacelet[(int)i][0]] == edgeColor[(int)j][1] 153 | && f[(int)edgeFacelet[(int)i][1]] == edgeColor[(int)j][0]) 154 | { 155 | ccRet.ep[(int)i] = j; 156 | ccRet.eo[(int)i] = 1; 157 | break; 158 | } 159 | } 160 | return ccRet; 161 | } 162 | 163 | 164 | //public Cube toCube() 165 | //{ 166 | // byte ori; 167 | // Cube ccRet = new Cube(); 168 | // for (int i = 0; i < 8; i++) 169 | // ccRet.cp[i] = Corner.URF;// invalidate corners 170 | // for (int i = 0; i < 12; i++) 171 | // ccRet.ep[i] = Edge.UR;// and edges 172 | // CubeColor col1, col2; 173 | // foreach (Corner i in (Corner[])Enum.GetValues(typeof(Corner))) 174 | // { 175 | // // get the CubeColors of the cubie at corner i, starting with U/D 176 | // for (ori = 0; ori < 3; ori++) 177 | // if (f[(int)cornerFacelet[(int)i][ori]] == CubeColor.U || f[(int)cornerFacelet[(int)i][ori]] == CubeColor.D) 178 | // break; 179 | // col1 = f[(int)cornerFacelet[(int)i][(ori + 1) % 3]]; 180 | // col2 = f[(int)cornerFacelet[(int)i][(ori + 2) % 3]]; 181 | 182 | // foreach (Corner j in (Corner[])Enum.GetValues(typeof(Corner))) 183 | // { 184 | // if (col1 == cornerColor[(int)j][1] && col2 == cornerColor[(int)j][2]) 185 | // { 186 | // // in cornerposition i we have cornercubie j 187 | // ccRet.cp[(int)i] = j; 188 | // ccRet.co[(int)i] = (byte)(ori % 3); 189 | // break; 190 | // } 191 | // } 192 | // } 193 | // foreach (Edge i in (Edge[])Enum.GetValues(typeof(Edge))) 194 | // foreach (Edge j in (Edge[])Enum.GetValues(typeof(Edge))) 195 | // { 196 | // if (f[(int)edgeFacelet[(int)i][0]] == edgeColor[(int)j][0] 197 | // && f[(int)edgeFacelet[(int)i][1]] == edgeColor[(int)j][1]) 198 | // { 199 | // ccRet.ep[(int)i] = j; 200 | // ccRet.eo[(int)i] = 0; 201 | // break; 202 | // } 203 | // if (f[(int)edgeFacelet[(int)i][0]] == edgeColor[(int)j][1] 204 | // && f[(int)edgeFacelet[(int)i][1]] == edgeColor[(int)j][0]) 205 | // { 206 | // ccRet.ep[(int)i] = j; 207 | // ccRet.eo[(int)i] = 1; 208 | // break; 209 | // } 210 | // } 211 | // return ccRet; 212 | //} 213 | } 214 | 215 | } 216 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__FaceCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3ae8c1d0382c0e47a37d40a1929f779 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Search.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Kociemba 4 | { 5 | public class Search 6 | { 7 | internal static int[] ax = new int[31]; // The axis of the move 8 | internal static int[] po = new int[31]; // The power of the move 9 | 10 | internal static int[] flip = new int[31]; // phase1 coordinates 11 | internal static int[] twist = new int[31]; 12 | internal static int[] slice = new int[31]; 13 | 14 | internal static int[] parity = new int[31]; // phase2 coordinates 15 | internal static int[] URFtoDLF = new int[31]; 16 | internal static int[] FRtoBR = new int[31]; 17 | internal static int[] URtoUL = new int[31]; 18 | internal static int[] UBtoDF = new int[31]; 19 | internal static int[] URtoDF = new int[31]; 20 | 21 | internal static int[] minDistPhase1 = new int[31]; // IDA* distance do goal estimations 22 | internal static int[] minDistPhase2 = new int[31]; 23 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | // generate the solution string from the array data 25 | internal static string solutionToString(int length) 26 | { 27 | string s = ""; 28 | for (int i = 0; i < length; i++) 29 | { 30 | switch (ax[i]) 31 | { 32 | case 0: 33 | s += "U"; 34 | break; 35 | case 1: 36 | s += "R"; 37 | break; 38 | case 2: 39 | s += "F"; 40 | break; 41 | case 3: 42 | s += "D"; 43 | break; 44 | case 4: 45 | s += "L"; 46 | break; 47 | case 5: 48 | s += "B"; 49 | break; 50 | } 51 | switch (po[i]) 52 | { 53 | case 1: 54 | s += " "; 55 | break; 56 | case 2: 57 | s += "2 "; 58 | break; 59 | case 3: 60 | s += "' "; 61 | break; 62 | 63 | } 64 | } 65 | return s; 66 | } 67 | 68 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 69 | // generate the solution string from the array data including a separator between phase1 and phase2 moves 70 | internal static string solutionToString(int length, int depthPhase1) 71 | { 72 | string s = ""; 73 | for (int i = 0; i < length; i++) 74 | { 75 | switch (ax[i]) 76 | { 77 | case 0: 78 | s += "U"; 79 | break; 80 | case 1: 81 | s += "R"; 82 | break; 83 | case 2: 84 | s += "F"; 85 | break; 86 | case 3: 87 | s += "D"; 88 | break; 89 | case 4: 90 | s += "L"; 91 | break; 92 | case 5: 93 | s += "B"; 94 | break; 95 | } 96 | switch (po[i]) 97 | { 98 | case 1: 99 | s += " "; 100 | break; 101 | case 2: 102 | s += "2 "; 103 | break; 104 | case 3: 105 | s += "' "; 106 | break; 107 | 108 | } 109 | if (i == depthPhase1 - 1) 110 | { 111 | s += ". "; 112 | } 113 | } 114 | return s; 115 | } 116 | 117 | /** 118 | * Computes the solver string for a given cube. 119 | * 120 | * @param facelets 121 | * is the cube definition string, see {@link Facelet} for the format. 122 | * 123 | * @param maxDepth 124 | * defines the maximal allowed maneuver length. For random cubes, a maxDepth of 21 usually will return a 125 | * solution in less than 0.5 seconds. With a maxDepth of 20 it takes a few seconds on average to find a 126 | * solution, but it may take much longer for specific cubes. 127 | * 128 | *@param timeOut 129 | * defines the maximum computing time of the method in seconds. If it does not return with a solution, it returns with 130 | * an error code. 131 | * 132 | * @param useSeparator 133 | * determines if a " . " separates the phase1 and phase2 parts of the solver string like in F' R B R L2 F . 134 | * U2 U D for example.
135 | * @return The solution string or an error code:
136 | * Error 1: There is not exactly one facelet of each colour
137 | * Error 2: Not all 12 edges exist exactly once
138 | * Error 3: Flip error: One edge has to be flipped
139 | * Error 4: Not all corners exist exactly once
140 | * Error 5: Twist error: One corner has to be twisted
141 | * Error 6: Parity error: Two corners or two edges have to be exchanged
142 | * Error 7: No solution exists for the given maxDepth
143 | * Error 8: Timeout, no solution within given time 144 | */ 145 | public static string solution(string facelets, out string info, int maxDepth = 22, long timeOut = 6000, bool useSeparator = false ) 146 | { 147 | 148 | DateTime startTime = DateTime.Now; 149 | info = ""; 150 | 151 | 152 | int s; 153 | // +++++++++++++++++++++check for wrong input +++++++++++++++++++++++++++++ 154 | int[] count = new int[6]; 155 | try 156 | { 157 | for (int i = 0; i < 54; i++) 158 | { 159 | count[(int)CubeColor.Parse(typeof(CubeColor), facelets.Substring(i, 1))]++; 160 | } 161 | } 162 | catch (Exception) 163 | { 164 | return "Error 1"; 165 | } 166 | for (int i = 0; i < 6; i++) 167 | { 168 | if (count[i] != 9) 169 | { 170 | return "Error 1"; 171 | } 172 | } 173 | 174 | FaceCube fc = new FaceCube(facelets); 175 | CubieCube cc = fc.toCubieCube(); 176 | if ((s = cc.verify()) != 0) 177 | { 178 | return "Error " + Math.Abs(s); 179 | } 180 | // +++++++++++++++++++++++ initialization +++++++++++++++++++++++++++++++++ 181 | string currentTime = "[ a: " + String.Format(@"{0:mm\:ss\.ffff}", (DateTime.Now - startTime)) + " ] "; 182 | CoordCube c = new CoordCube(cc, startTime, currentTime, out info); 183 | //return "lol"; 184 | 185 | po[0] = 0; 186 | ax[0] = 0; 187 | flip[0] = c.flip; 188 | twist[0] = c.twist; 189 | parity[0] = c.parity; 190 | slice[0] = c.FRtoBR / 24; 191 | URFtoDLF[0] = c.URFtoDLF; 192 | FRtoBR[0] = c.FRtoBR; 193 | URtoUL[0] = c.URtoUL; 194 | UBtoDF[0] = c.UBtoDF; 195 | minDistPhase1[1] = 1; // else failure for depth=1, n=0 196 | int mv = 0, n = 0; 197 | bool busy = false; 198 | int depthPhase1 = 1; 199 | long tStart = DateTimeHelper.CurrentUnixTimeMillis(); 200 | 201 | // +++++++++++++++++++ Main loop ++++++++++++++++++++++++++++++++++++++++++ 202 | do 203 | { 204 | do 205 | { 206 | if ((depthPhase1 - n > minDistPhase1[n + 1]) && !busy) 207 | { 208 | 209 | if (ax[n] == 0 || ax[n] == 3) // Initialize next move 210 | { 211 | ax[++n] = 1; 212 | } 213 | else 214 | { 215 | ax[++n] = 0; 216 | } 217 | po[n] = 1; 218 | } 219 | else if (++po[n] > 3) 220 | { 221 | do 222 | { // increment axis 223 | if (++ax[n] > 5) 224 | { 225 | 226 | if (DateTimeHelper.CurrentUnixTimeMillis() - tStart > timeOut << 10) 227 | { 228 | return "Error 8"; 229 | } 230 | 231 | if (n == 0) 232 | { 233 | if (depthPhase1 >= maxDepth) 234 | { 235 | return "Error 7"; 236 | } 237 | else 238 | { 239 | depthPhase1++; 240 | ax[n] = 0; 241 | po[n] = 1; 242 | busy = false; 243 | break; 244 | } 245 | } 246 | else 247 | { 248 | n--; 249 | busy = true; 250 | break; 251 | } 252 | 253 | } 254 | else 255 | { 256 | po[n] = 1; 257 | busy = false; 258 | } 259 | } while (n != 0 && (ax[n - 1] == ax[n] || ax[n - 1] - 3 == ax[n])); 260 | } 261 | else 262 | { 263 | busy = false; 264 | } 265 | } while (busy); 266 | 267 | // +++++++++++++ compute new coordinates and new minDistPhase1 ++++++++++ 268 | // if minDistPhase1 =0, the H subgroup is reached 269 | mv = 3 * ax[n] + po[n] - 1; 270 | flip[n + 1] = CoordCube.flipMove[flip[n],mv]; 271 | twist[n + 1] = CoordCube.twistMove[twist[n],mv]; 272 | slice[n + 1] = CoordCube.FRtoBR_Move[slice[n] * 24,mv] / 24; 273 | minDistPhase1[n + 1] = Math.Max(CoordCube.getPruning(CoordCube.Slice_Flip_Prun, CoordCube.N_SLICE1 * flip[n + 1] + slice[n + 1]), CoordCube.getPruning(CoordCube.Slice_Twist_Prun, CoordCube.N_SLICE1 * twist[n + 1] + slice[n + 1])); 274 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 275 | 276 | if (minDistPhase1[n + 1] == 0 && n >= depthPhase1 - 5) 277 | { 278 | minDistPhase1[n + 1] = 10; // instead of 10 any value >5 is possible 279 | if (n == depthPhase1 - 1 && (s = totalDepth(depthPhase1, maxDepth)) >= 0) 280 | { 281 | if (s == depthPhase1 || (ax[depthPhase1 - 1] != ax[depthPhase1] && ax[depthPhase1 - 1] != ax[depthPhase1] + 3)) 282 | { 283 | if (facelets == "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB") 284 | { 285 | info = "Already Solved"; 286 | return ""; 287 | } 288 | return useSeparator ? solutionToString(s, depthPhase1) : solutionToString(s); 289 | } 290 | } 291 | 292 | } 293 | } while (true); 294 | } 295 | 296 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 297 | // Apply phase2 of algorithm and return the combined phase1 and phase2 depth. In phase2, only the moves 298 | // U,D,R2,F2,L2 and B2 are allowed. 299 | internal static int totalDepth(int depthPhase1, int maxDepth) 300 | { 301 | int mv = 0, d1 = 0, d2 = 0; 302 | int maxDepthPhase2 = Math.Min(10, maxDepth - depthPhase1); // Allow only max 10 moves in phase2 303 | for (int i = 0; i < depthPhase1; i++) 304 | { 305 | mv = 3 * ax[i] + po[i] - 1; 306 | URFtoDLF[i + 1] = CoordCube.URFtoDLF_Move[URFtoDLF[i], mv]; 307 | FRtoBR[i + 1] = CoordCube.FRtoBR_Move[FRtoBR[i], mv]; 308 | parity[i + 1] = CoordCube.parityMove[parity[i]][mv]; 309 | } 310 | 311 | if ((d1 = CoordCube.getPruning(CoordCube.Slice_URFtoDLF_Parity_Prun, (CoordCube.N_SLICE2 * URFtoDLF[depthPhase1] + FRtoBR[depthPhase1]) * 2 + parity[depthPhase1])) > maxDepthPhase2) 312 | { 313 | return -1; 314 | } 315 | 316 | for (int i = 0; i < depthPhase1; i++) 317 | { 318 | mv = 3 * ax[i] + po[i] - 1; 319 | URtoUL[i + 1] = CoordCube.URtoUL_Move[URtoUL[i], mv]; 320 | UBtoDF[i + 1] = CoordCube.UBtoDF_Move[UBtoDF[i], mv]; 321 | } 322 | URtoDF[depthPhase1] = CoordCube.MergeURtoULandUBtoDF[URtoUL[depthPhase1],UBtoDF[depthPhase1]]; 323 | 324 | if ((d2 = CoordCube.getPruning(CoordCube.Slice_URtoDF_Parity_Prun, (CoordCube.N_SLICE2 * URtoDF[depthPhase1] + FRtoBR[depthPhase1]) * 2 + parity[depthPhase1])) > maxDepthPhase2) 325 | { 326 | return -1; 327 | } 328 | 329 | if ((minDistPhase2[depthPhase1] = Math.Max(d1, d2)) == 0) // already solved 330 | { 331 | return depthPhase1; 332 | } 333 | 334 | // now set up search 335 | 336 | int depthPhase2 = 1; 337 | int n = depthPhase1; 338 | bool busy = false; 339 | po[depthPhase1] = 0; 340 | ax[depthPhase1] = 0; 341 | minDistPhase2[n + 1] = 1; // else failure for depthPhase2=1, n=0 342 | // +++++++++++++++++++ end initialization +++++++++++++++++++++++++++++++++ 343 | do 344 | { 345 | do 346 | { 347 | if ((depthPhase1 + depthPhase2 - n > minDistPhase2[n + 1]) && !busy) 348 | { 349 | 350 | if (ax[n] == 0 || ax[n] == 3) // Initialize next move 351 | { 352 | ax[++n] = 1; 353 | po[n] = 2; 354 | } 355 | else 356 | { 357 | ax[++n] = 0; 358 | po[n] = 1; 359 | } 360 | } 361 | else if ((ax[n] == 0 || ax[n] == 3) ? (++po[n] > 3) : ((po[n] = po[n] + 2) > 3)) 362 | { 363 | do 364 | { // increment axis 365 | if (++ax[n] > 5) 366 | { 367 | if (n == depthPhase1) 368 | { 369 | if (depthPhase2 >= maxDepthPhase2) 370 | { 371 | return -1; 372 | } 373 | else 374 | { 375 | depthPhase2++; 376 | ax[n] = 0; 377 | po[n] = 1; 378 | busy = false; 379 | break; 380 | } 381 | } 382 | else 383 | { 384 | n--; 385 | busy = true; 386 | break; 387 | } 388 | 389 | } 390 | else 391 | { 392 | if (ax[n] == 0 || ax[n] == 3) 393 | { 394 | po[n] = 1; 395 | } 396 | else 397 | { 398 | po[n] = 2; 399 | } 400 | busy = false; 401 | } 402 | } while (n != depthPhase1 && (ax[n - 1] == ax[n] || ax[n - 1] - 3 == ax[n])); 403 | } 404 | else 405 | { 406 | busy = false; 407 | } 408 | } while (busy); 409 | // +++++++++++++ compute new coordinates and new minDist ++++++++++ 410 | mv = 3 * ax[n] + po[n] - 1; 411 | 412 | URFtoDLF[n + 1] = CoordCube.URFtoDLF_Move[URFtoDLF[n], mv]; 413 | FRtoBR[n + 1] = CoordCube.FRtoBR_Move[FRtoBR[n],mv]; 414 | parity[n + 1] = CoordCube.parityMove[parity[n]][mv]; 415 | URtoDF[n + 1] = CoordCube.URtoDF_Move[URtoDF[n], mv]; 416 | 417 | minDistPhase2[n + 1] = Math.Max(CoordCube.getPruning(CoordCube.Slice_URtoDF_Parity_Prun, (CoordCube.N_SLICE2 * URtoDF[n + 1] + FRtoBR[n + 1]) * 2 + parity[n + 1]), CoordCube.getPruning(CoordCube.Slice_URFtoDLF_Parity_Prun, (CoordCube.N_SLICE2 * URFtoDLF[n + 1] + FRtoBR[n + 1]) * 2 + parity[n + 1])); 418 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 419 | 420 | } while (minDistPhase2[n + 1] != 0); 421 | return depthPhase1 + depthPhase2; 422 | } 423 | } 424 | 425 | 426 | 427 | 428 | //--------------------------------------------------------------------------------------------------------- 429 | // Copyright © 2007 - 2020 Tangible Software Solutions, Inc. 430 | // This class can be used by anyone provided that the copyright notice remains intact. 431 | // 432 | // This class is used to replace calls to Java's System.currentTimeMillis with the C# equivalent. 433 | // Unix time is defined as the number of seconds that have elapsed since midnight UTC, 1 January 1970. 434 | //--------------------------------------------------------------------------------------------------------- 435 | internal static class DateTimeHelper 436 | { 437 | private static readonly System.DateTime Jan1st1970 = new System.DateTime(1970, 1, 1, 0, 0, 0, System.DateTimeKind.Utc); 438 | public static long CurrentUnixTimeMillis() 439 | { 440 | return (long)(System.DateTime.UtcNow - Jan1st1970).TotalMilliseconds; 441 | } 442 | } 443 | } -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Search.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e091a969387e8af49b7875b75db21f86 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Tools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using UnityEngine; 4 | using System.Runtime.Serialization.Formatters.Binary; 5 | 6 | namespace Kociemba 7 | { 8 | public class Tools 9 | { 10 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 | // Check if the cube string s represents a solvable cube. 12 | // 0: Cube is solvable 13 | // -1: There is not exactly one facelet of each colour 14 | // -2: Not all 12 edges exist exactly once 15 | // -3: Flip error: One edge has to be flipped 16 | // -4: Not all corners exist exactly once 17 | // -5: Twist error: One corner has to be twisted 18 | // -6: Parity error: Two corners or two edges have to be exchanged 19 | // 20 | /// 21 | /// Check if the cube definition string s represents a solvable cube. 22 | /// 23 | /// is the cube definition string , see 24 | /// 0: Cube is solvable
25 | /// -1: There is not exactly one facelet of each colour
26 | /// -2: Not all 12 edges exist exactly once
27 | /// -3: Flip error: One edge has to be flipped
28 | /// -4: Not all 8 corners exist exactly once
29 | /// -5: Twist error: One corner has to be twisted
30 | /// -6: Parity error: Two corners or two edges have to be exchanged
31 | public static int verify(string s) 32 | { 33 | int[] count = new int[6]; 34 | try 35 | { 36 | for (int i = 0; i < 54; i++) 37 | { 38 | count[(int)CubeColor.Parse(typeof(CubeColor), i.ToString())]++; 39 | } 40 | } 41 | catch (Exception) 42 | { 43 | return -1; 44 | } 45 | 46 | for (int i = 0; i < 6; i++) 47 | { 48 | if (count[i] != 9) 49 | { 50 | return -1; 51 | } 52 | } 53 | 54 | FaceCube fc = new FaceCube(s); 55 | CubieCube cc = fc.toCubieCube(); 56 | 57 | return cc.verify(); 58 | } 59 | 60 | /// 61 | /// Generates a random cube. 62 | /// A random cube in the string representation. Each cube of the cube space has the same probability. 63 | public static string randomCube() 64 | { 65 | CubieCube cc = new CubieCube(); 66 | System.Random gen = new System.Random(); 67 | cc.setFlip((short)gen.Next(CoordCube.N_FLIP)); 68 | cc.setTwist((short)gen.Next(CoordCube.N_TWIST)); 69 | do 70 | { 71 | cc.setURFtoDLB(gen.Next(CoordCube.N_URFtoDLB)); 72 | cc.setURtoBR(gen.Next(CoordCube.N_URtoBR)); 73 | } while ((cc.edgeParity() ^ cc.cornerParity()) != 0); 74 | FaceCube fc = cc.toFaceCube(); 75 | return fc.to_fc_String(); 76 | } 77 | 78 | 79 | // https://stackoverflow.com/questions/7742519/c-sharp-export-write-multidimension-array-to-file-csv-or-whatever 80 | // Kristian Fenn: https://stackoverflow.com/users/989539/kristian-fenn 81 | 82 | public static void SerializeTable(string filename, short[,] array) 83 | { 84 | EnsureFolder("Assets\\Resources\\"); 85 | BinaryFormatter bf = new BinaryFormatter(); 86 | Stream s = File.Open("Assets\\Resources\\" + filename + ".bytes", FileMode.Create); 87 | bf.Serialize(s, array); 88 | s.Close(); 89 | } 90 | 91 | public static short[,] DeserializeTable(string filename) 92 | { 93 | 94 | TextAsset asset = Resources.Load(filename) as TextAsset; 95 | Stream s = new MemoryStream(asset.bytes); 96 | //Stream s = File.Open("Assets\\Resources\\" + filename, FileMode.Open); 97 | BinaryFormatter bf = new BinaryFormatter(); 98 | short[,] array = (short[,])bf.Deserialize(s); 99 | s.Close(); 100 | return array; 101 | } 102 | 103 | public static void SerializeSbyteArray(string filename, sbyte[] array) 104 | { 105 | EnsureFolder("Assets\\Resources\\"); 106 | BinaryFormatter bf = new BinaryFormatter(); 107 | Stream s = File.Open("Assets\\Resources\\" + filename + ".bytes", FileMode.Create); 108 | bf.Serialize(s, array); 109 | s.Close(); 110 | } 111 | 112 | public static sbyte[] DeserializeSbyteArray(string filename) 113 | { 114 | TextAsset asset = Resources.Load(filename) as TextAsset; 115 | Stream s = new MemoryStream(asset.bytes); 116 | //Stream s = File.Open("Assets\\Resources\\" + filename, FileMode.Open); 117 | BinaryFormatter bf = new BinaryFormatter(); 118 | sbyte[] array = (sbyte[])bf.Deserialize(s); 119 | s.Close(); 120 | return array; 121 | } 122 | 123 | // https://stackoverflow.com/questions/3695163/filestream-and-creating-folders 124 | // Joe: https://stackoverflow.com/users/13087/joe 125 | 126 | static void EnsureFolder(string path) 127 | { 128 | string directoryName = Path.GetDirectoryName(path); 129 | // If path is a file name only, directory name will be an empty string 130 | if (directoryName.Length > 0) 131 | { 132 | // Create all directories on the path that don't already exist 133 | Directory.CreateDirectory(directoryName); 134 | } 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /Assets/Prefabs/Kociemba/__Tools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f3b8b0afdd6e904ab7347b56bdc1154 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3264d2ce46f3b6148b838452645a21d0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Black.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Black 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Black.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bba3457b570cb66418e36d1e3c43d967 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Blue 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0.08760595, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18f4c4590abafd04fa41ffabf11b481f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Green 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 1, b: 0.075142145, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a5158627dbbf1b47844bbdbb23d8ac2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Orange.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Orange 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 0.43604654, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Orange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9915613289702548912263bf493da56 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Red 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 0.068398155, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dff5a2572405ba14fa3c9d0dc573d2ab 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/White.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: White 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/White.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa9499a15423e1341a143b277c3ecc89 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Yellow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Yellow 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.9896493, g: 1, b: 0.033018887, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/Yellow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21882ab5a5a7e7749b6a9bd788c67a72 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/mark-asthoff-Pk8t4cL2pkw-unsplash.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mark-asthoff-Pk8t4cL2pkw-unsplash 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 11211aa393f5aa541be6d9f8a51fa5ec, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Prefabs/Materials/mark-asthoff-Pk8t4cL2pkw-unsplash.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32ca966e59f663c40a437ba4d4caf689 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/RayStart.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1894064575868688559 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6759146023867969735} 12 | m_Layer: 0 13 | m_Name: RayStart 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &6759146023867969735 20 | Transform: 21 | m_ObjectHideFlags: 0 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 1894064575868688559} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 0, z: 0} 28 | m_LocalScale: {x: 1, y: 1, z: 1} 29 | m_Children: [] 30 | m_Father: {fileID: 0} 31 | m_RootOrder: 0 32 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 33 | -------------------------------------------------------------------------------- /Assets/Prefabs/RayStart.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e15cff795f17ee4ba7a2cffa53d143d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/mark-asthoff-Pk8t4cL2pkw-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Prefabs/mark-asthoff-Pk8t4cL2pkw-unsplash.jpg -------------------------------------------------------------------------------- /Assets/Prefabs/mark-asthoff-Pk8t4cL2pkw-unsplash.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11211aa393f5aa541be6d9f8a51fa5ec 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: -1 36 | aniso: -1 37 | mipBias: -100 38 | wrapU: -1 39 | wrapV: -1 40 | wrapW: -1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: [] 80 | physicsShape: [] 81 | bones: [] 82 | spriteID: 83 | internalID: 0 84 | vertices: [] 85 | indices: 86 | edges: [] 87 | weights: [] 88 | secondaryTextures: [] 89 | spritePackingTag: 90 | pSDRemoveMatte: 0 91 | pSDShowRemoveMatteOption: 0 92 | userData: 93 | assetBundleName: 94 | assetBundleVariant: 95 | -------------------------------------------------------------------------------- /Assets/ReadCube.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ReadCube : MonoBehaviour 6 | { 7 | //Rays 8 | public Transform tUp; 9 | public Transform tDown; 10 | public Transform tLeft; 11 | public Transform tRight; 12 | public Transform tBack; 13 | public Transform tFront; 14 | 15 | private List frontRays = new List(); 16 | private List backRays = new List(); 17 | private List upRays = new List(); 18 | private List downRays = new List(); 19 | private List leftRays = new List(); 20 | private List rightRays = new List(); 21 | 22 | private int layerMask = 1 << 8; //LayerMask 23 | CubeState cubeState; 24 | CubeMap cubeMap; 25 | public GameObject emptyGO; 26 | 27 | // Start is called before the first frame update 28 | void Start() 29 | { 30 | SetRayTransforms(); 31 | 32 | cubeState = FindObjectOfType(); 33 | cubeMap = FindObjectOfType(); 34 | 35 | ReadState(); 36 | CubeState.started = true; 37 | } 38 | 39 | // Update is called once per frame 40 | void Update() 41 | { 42 | //ReadState(); 43 | } 44 | 45 | public void ReadState() 46 | { 47 | cubeState = FindObjectOfType(); 48 | cubeMap = FindObjectOfType(); 49 | 50 | cubeState.up = ReadFace(upRays, tUp); 51 | cubeState.down = ReadFace(downRays, tDown); 52 | cubeState.left = ReadFace(leftRays, tLeft); 53 | cubeState.right = ReadFace(rightRays, tRight); 54 | cubeState.front = ReadFace(frontRays, tFront); 55 | cubeState.back = ReadFace(backRays, tBack); 56 | 57 | cubeMap.Set(); 58 | 59 | } 60 | 61 | void SetRayTransforms() 62 | { 63 | upRays = BuildRays(tUp, new Vector3(90, 90, 0)); 64 | downRays = BuildRays(tDown, new Vector3(270, 90, 0)); 65 | leftRays = BuildRays(tLeft, new Vector3(0, 180, 0)); 66 | rightRays = BuildRays(tRight, new Vector3(0, 0, 0)); 67 | frontRays = BuildRays(tFront, new Vector3(0, 90, 0)); 68 | backRays = BuildRays(tBack, new Vector3(0, 270, 0)); 69 | } 70 | 71 | List BuildRays(Transform rayTransform, Vector3 direction) 72 | { 73 | int rayCount = 0; 74 | List rays = new List(); 75 | 76 | for(int y = 1; y > -2; y--) 77 | { 78 | for (int x = -1; x < 2; x++) 79 | { 80 | Vector3 startPos = new Vector3(rayTransform.localPosition.x + x, rayTransform.localPosition.y + y, rayTransform.localPosition.z); 81 | GameObject rayStart = Instantiate(emptyGO, startPos, Quaternion.identity, rayTransform); 82 | rayStart.name = rayCount.ToString(); 83 | rays.Add(rayStart); 84 | rayCount++; 85 | } 86 | } 87 | rayTransform.localRotation = Quaternion.Euler(direction); 88 | return rays; 89 | } 90 | 91 | public List ReadFace(List rayStarts, Transform rayTransform) 92 | { 93 | List facesHit = new List(); 94 | 95 | foreach(GameObject rayStart in rayStarts) 96 | { 97 | Vector3 ray = rayStart.transform.position; 98 | RaycastHit hit; 99 | 100 | //Ray cast Intersects with Objects 101 | if (Physics.Raycast(ray, rayTransform.forward, out hit, Mathf.Infinity, layerMask)) 102 | { 103 | Debug.DrawRay(ray, rayTransform.forward * hit.distance, Color.yellow); 104 | facesHit.Add(hit.collider.gameObject); 105 | //Debug.Log(hit.collider.gameObject.name); 106 | } 107 | else 108 | { 109 | Debug.DrawRay(ray, rayTransform.forward * 1000, Color.green); 110 | } 111 | } 112 | 113 | return facesHit; 114 | 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Assets/ReadCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfe525a4c3476ee4a81bc50c66cbcabf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a01a7451905458e48b659c52cd35789f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/FRtoBR.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/FRtoBR.bytes -------------------------------------------------------------------------------- /Assets/Resources/FRtoBR.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f4c1d6db9652634b8b33313e74104c6 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/MergeURtoULandUBtoDF.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/MergeURtoULandUBtoDF.bytes -------------------------------------------------------------------------------- /Assets/Resources/MergeURtoULandUBtoDF.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 045a52608a0d8f249ae3ac353185226f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/Slice_Flip_Prun.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/Slice_Flip_Prun.bytes -------------------------------------------------------------------------------- /Assets/Resources/Slice_Flip_Prun.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f4595d2e4bbd1d40bede21b5890dd9a 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/Slice_Twist_Prun.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/Slice_Twist_Prun.bytes -------------------------------------------------------------------------------- /Assets/Resources/Slice_Twist_Prun.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93bbd643ccade0244ad13fe92cc84959 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/Slice_URFtoDLF_Parity_Prun.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/Slice_URFtoDLF_Parity_Prun.bytes -------------------------------------------------------------------------------- /Assets/Resources/Slice_URFtoDLF_Parity_Prun.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 390f712ce7721cb4a99ee99fdc71bee6 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/Slice_URtoDF_Parity_Prun.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/Slice_URtoDF_Parity_Prun.bytes -------------------------------------------------------------------------------- /Assets/Resources/Slice_URtoDF_Parity_Prun.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 029392e6be2139645b63df5700566fe2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/UBtoDF.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/UBtoDF.bytes -------------------------------------------------------------------------------- /Assets/Resources/UBtoDF.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d41d56289a1fc64992c60408d91eaf4 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/URFtoDLF.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/URFtoDLF.bytes -------------------------------------------------------------------------------- /Assets/Resources/URFtoDLF.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9585001718601504d930bc0cd338dc63 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/URtoDF.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/URtoDF.bytes -------------------------------------------------------------------------------- /Assets/Resources/URtoDF.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9defa41ca1cbffd4eaf5ad2debc26bea 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/URtoUL.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/URtoUL.bytes -------------------------------------------------------------------------------- /Assets/Resources/URtoUL.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89e6a6cfff650624fad13bc61a9a219e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/flip.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/flip.bytes -------------------------------------------------------------------------------- /Assets/Resources/flip.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24518ecc29272d74284be6b54cee9620 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/twist.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/Assets/Resources/twist.bytes -------------------------------------------------------------------------------- /Assets/Resources/twist.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60ea58d557ea7be439fe85b7949757df 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/RotateCube.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RotateCube : MonoBehaviour 6 | { 7 | //Attributes 8 | Vector2 firstPressPos; 9 | Vector2 secondPressPos; 10 | Vector2 currentSwipe; 11 | Vector3 previousMousePosition; 12 | Vector3 mouseDelta; 13 | public GameObject target; 14 | float speed = 200f; 15 | 16 | // Start is called before the first frame update 17 | void Start() 18 | { 19 | 20 | } 21 | 22 | // Update is called once per frame 23 | void Update() 24 | { 25 | Swipe(); 26 | Drag(); 27 | 28 | } 29 | 30 | void Drag() 31 | { 32 | if(Input.GetMouseButton(1)) 33 | { 34 | //While the Mouse is Held Down the Cube can be Moved around its central Axis 35 | mouseDelta = Input.mousePosition - previousMousePosition; 36 | mouseDelta *= 0.1f; 37 | transform.rotation = Quaternion.Euler(mouseDelta.y, -mouseDelta.x, 0) * transform.rotation; 38 | } 39 | else 40 | { 41 | //Automatically Move to the Target position 42 | if (transform.rotation != target.transform.rotation) 43 | { 44 | var step = speed * Time.deltaTime; 45 | transform.rotation = Quaternion.RotateTowards(transform.rotation, target.transform.rotation, step); 46 | } 47 | } 48 | previousMousePosition = Input.mousePosition; 49 | } 50 | 51 | void Swipe() 52 | { 53 | if (Input.GetMouseButtonDown(1)) 54 | { 55 | //Get the 2D Position of the first mouse Click 56 | firstPressPos = new Vector2(Input.mousePosition.x, Input.mousePosition.y); 57 | } 58 | if(Input.GetMouseButtonUp(1)) 59 | { 60 | //Get the 2D Position of the first mouse Click 61 | secondPressPos = new Vector2(Input.mousePosition.x, Input.mousePosition.y); 62 | //Create a Vector from the First and the Second Click 63 | currentSwipe = new Vector2(secondPressPos.x - firstPressPos.x, secondPressPos.y - firstPressPos.y); 64 | //Normalize the 2D Vector 65 | currentSwipe.Normalize(); 66 | //Swipe Depending on the Input 67 | if(LeftSwipe(currentSwipe)) 68 | { 69 | target.transform.Rotate(0, 90, 0, Space.World); 70 | } 71 | else if (RightSwipe(currentSwipe)) 72 | { 73 | target.transform.Rotate(0, -90, 0, Space.World); 74 | } 75 | else if (UpRightSwipe(currentSwipe)) 76 | { 77 | target.transform.Rotate(0, 0, -90, Space.World); 78 | } 79 | else if (UpLeftSwipe(currentSwipe)) 80 | { 81 | target.transform.Rotate(90, 0, 0, Space.World); 82 | } 83 | else if (DownRightSwipe(currentSwipe)) 84 | { 85 | target.transform.Rotate(-90, 0, 0, Space.World); 86 | } 87 | else if (DownLeftSwipe(currentSwipe)) 88 | { 89 | target.transform.Rotate(0, 0, 90, Space.World); 90 | } 91 | 92 | } 93 | } 94 | 95 | bool LeftSwipe(Vector2 swipe) 96 | { 97 | return currentSwipe.x < 0 && currentSwipe.y > -0.5f && currentSwipe.y < 0.5f; 98 | } 99 | 100 | bool RightSwipe(Vector2 swipe) 101 | { 102 | return currentSwipe.x > 0 && currentSwipe.y > -0.5f && currentSwipe.y < 0.5f; 103 | } 104 | 105 | bool UpLeftSwipe(Vector2 swipe) 106 | { 107 | return currentSwipe.y > 0 && currentSwipe.x < 0f; 108 | } 109 | 110 | bool UpRightSwipe(Vector2 swipe) 111 | { 112 | return currentSwipe.y > 0 && currentSwipe.x > 0f; 113 | } 114 | 115 | bool DownLeftSwipe(Vector2 swipe) 116 | { 117 | return currentSwipe.y < 0 && currentSwipe.x < 0f; 118 | } 119 | 120 | bool DownRightSwipe(Vector2 swipe) 121 | { 122 | return currentSwipe.y < 0 && currentSwipe.x > 0f; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /Assets/RotateCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60d680afe74162f43ad9bd5e0e19d625 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af75ac9658586a84d939d9fdf90659bb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SelectFace.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SelectFace : MonoBehaviour 6 | { 7 | CubeState cubeState; 8 | ReadCube readCube; 9 | int layerMask = 1 << 8; 10 | 11 | // Start is called before the first frame update 12 | void Start() 13 | { 14 | readCube = FindObjectOfType(); 15 | cubeState = FindObjectOfType(); 16 | } 17 | 18 | // Update is called once per frame 19 | void Update() 20 | { 21 | if(Input.GetMouseButtonDown(0) && !CubeState.autoRotating ) 22 | { 23 | //Read Current State of Cube 24 | readCube.ReadState(); 25 | 26 | //RayCast from the mouse towards the cube to see if a face is hit 27 | RaycastHit hit; 28 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 29 | if(Physics.Raycast(ray, out hit, 100.0f, layerMask)) 30 | { 31 | GameObject face = hit.collider.gameObject; 32 | //Make a List of all the Sides 33 | List> cubeSides = new List>() 34 | { 35 | cubeState.up, 36 | cubeState.down, 37 | cubeState.left, 38 | cubeState.right, 39 | cubeState.front, 40 | cubeState.back 41 | }; 42 | foreach(List cubeSide in cubeSides) 43 | { 44 | if(cubeSide.Contains(face)) 45 | { 46 | cubeState.PickUp(cubeSide); 47 | 48 | cubeSide[4].transform.parent.GetComponent().Rotate(cubeSide); 49 | } 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/SelectFace.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d07c3233373e9d44860b3b7c615a976 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SolveTwoPhase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Kociemba; 5 | 6 | 7 | public class SolveTwoPhase : MonoBehaviour 8 | { 9 | private ReadCube readCube; 10 | private CubeState cubeState; 11 | private bool doOnce = true; 12 | 13 | // Start is called before the first frame update 14 | void Start() 15 | { 16 | readCube = FindObjectOfType(); 17 | cubeState = FindObjectOfType(); 18 | 19 | } 20 | 21 | // Update is called once per frame 22 | void Update() 23 | { 24 | if(CubeState.started && doOnce) 25 | { 26 | doOnce = false; 27 | Solver(); 28 | } 29 | } 30 | 31 | public void Solver() 32 | { 33 | readCube.ReadState(); 34 | 35 | //Get the State of the cube as a string 36 | string moveString = cubeState.GetStateString(); 37 | Debug.Log(moveString); 38 | 39 | //Solve the Cube 40 | 41 | string info = ""; 42 | 43 | //First Time Build the Tables 44 | //string solution = SearchRunTime.solution(moveString, out info, buildTables: true); 45 | 46 | //Every other time 47 | string solution = Search.solution(moveString, out info); 48 | 49 | 50 | //Convert the Solved Moves from a string to a list 51 | List solutionList = StringToList(solution); 52 | 53 | 54 | //Automate the List 55 | Automate.moveList = solutionList; 56 | 57 | } 58 | 59 | List StringToList(string solution) 60 | { 61 | List solutionList = new List(solution.Split(new string[] { " " }, System.StringSplitOptions.RemoveEmptyEntries)); 62 | return solutionList; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/SolveTwoPhase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bbbb9bd0ff3aa84298ba457cf5cffba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.3.9", 4 | "com.unity.ide.rider": "1.2.1", 5 | "com.unity.ide.visualstudio": "2.0.5", 6 | "com.unity.ide.vscode": "1.2.3", 7 | "com.unity.test-framework": "1.1.19", 8 | "com.unity.textmeshpro": "3.0.1", 9 | "com.unity.timeline": "1.3.6", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": { 4 | "version": "1.3.9", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.ext.nunit": { 11 | "version": "1.0.5", 12 | "depth": 1, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://packages.unity.com" 16 | }, 17 | "com.unity.ide.rider": { 18 | "version": "1.2.1", 19 | "depth": 0, 20 | "source": "registry", 21 | "dependencies": { 22 | "com.unity.test-framework": "1.1.1" 23 | }, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.ide.visualstudio": { 27 | "version": "2.0.5", 28 | "depth": 0, 29 | "source": "registry", 30 | "dependencies": {}, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.ide.vscode": { 34 | "version": "1.2.3", 35 | "depth": 0, 36 | "source": "registry", 37 | "dependencies": {}, 38 | "url": "https://packages.unity.com" 39 | }, 40 | "com.unity.test-framework": { 41 | "version": "1.1.19", 42 | "depth": 0, 43 | "source": "registry", 44 | "dependencies": { 45 | "com.unity.ext.nunit": "1.0.5", 46 | "com.unity.modules.imgui": "1.0.0", 47 | "com.unity.modules.jsonserialize": "1.0.0" 48 | }, 49 | "url": "https://packages.unity.com" 50 | }, 51 | "com.unity.textmeshpro": { 52 | "version": "3.0.1", 53 | "depth": 0, 54 | "source": "registry", 55 | "dependencies": { 56 | "com.unity.ugui": "1.0.0" 57 | }, 58 | "url": "https://packages.unity.com" 59 | }, 60 | "com.unity.timeline": { 61 | "version": "1.3.6", 62 | "depth": 0, 63 | "source": "registry", 64 | "dependencies": {}, 65 | "url": "https://packages.unity.com" 66 | }, 67 | "com.unity.ugui": { 68 | "version": "1.0.0", 69 | "depth": 0, 70 | "source": "builtin", 71 | "dependencies": { 72 | "com.unity.modules.ui": "1.0.0", 73 | "com.unity.modules.imgui": "1.0.0" 74 | } 75 | }, 76 | "com.unity.modules.ai": { 77 | "version": "1.0.0", 78 | "depth": 0, 79 | "source": "builtin", 80 | "dependencies": {} 81 | }, 82 | "com.unity.modules.androidjni": { 83 | "version": "1.0.0", 84 | "depth": 0, 85 | "source": "builtin", 86 | "dependencies": {} 87 | }, 88 | "com.unity.modules.animation": { 89 | "version": "1.0.0", 90 | "depth": 0, 91 | "source": "builtin", 92 | "dependencies": {} 93 | }, 94 | "com.unity.modules.assetbundle": { 95 | "version": "1.0.0", 96 | "depth": 0, 97 | "source": "builtin", 98 | "dependencies": {} 99 | }, 100 | "com.unity.modules.audio": { 101 | "version": "1.0.0", 102 | "depth": 0, 103 | "source": "builtin", 104 | "dependencies": {} 105 | }, 106 | "com.unity.modules.cloth": { 107 | "version": "1.0.0", 108 | "depth": 0, 109 | "source": "builtin", 110 | "dependencies": { 111 | "com.unity.modules.physics": "1.0.0" 112 | } 113 | }, 114 | "com.unity.modules.director": { 115 | "version": "1.0.0", 116 | "depth": 0, 117 | "source": "builtin", 118 | "dependencies": { 119 | "com.unity.modules.audio": "1.0.0", 120 | "com.unity.modules.animation": "1.0.0" 121 | } 122 | }, 123 | "com.unity.modules.imageconversion": { 124 | "version": "1.0.0", 125 | "depth": 0, 126 | "source": "builtin", 127 | "dependencies": {} 128 | }, 129 | "com.unity.modules.imgui": { 130 | "version": "1.0.0", 131 | "depth": 0, 132 | "source": "builtin", 133 | "dependencies": {} 134 | }, 135 | "com.unity.modules.jsonserialize": { 136 | "version": "1.0.0", 137 | "depth": 0, 138 | "source": "builtin", 139 | "dependencies": {} 140 | }, 141 | "com.unity.modules.particlesystem": { 142 | "version": "1.0.0", 143 | "depth": 0, 144 | "source": "builtin", 145 | "dependencies": {} 146 | }, 147 | "com.unity.modules.physics": { 148 | "version": "1.0.0", 149 | "depth": 0, 150 | "source": "builtin", 151 | "dependencies": {} 152 | }, 153 | "com.unity.modules.physics2d": { 154 | "version": "1.0.0", 155 | "depth": 0, 156 | "source": "builtin", 157 | "dependencies": {} 158 | }, 159 | "com.unity.modules.screencapture": { 160 | "version": "1.0.0", 161 | "depth": 0, 162 | "source": "builtin", 163 | "dependencies": { 164 | "com.unity.modules.imageconversion": "1.0.0" 165 | } 166 | }, 167 | "com.unity.modules.subsystems": { 168 | "version": "1.0.0", 169 | "depth": 1, 170 | "source": "builtin", 171 | "dependencies": { 172 | "com.unity.modules.jsonserialize": "1.0.0" 173 | } 174 | }, 175 | "com.unity.modules.terrain": { 176 | "version": "1.0.0", 177 | "depth": 0, 178 | "source": "builtin", 179 | "dependencies": {} 180 | }, 181 | "com.unity.modules.terrainphysics": { 182 | "version": "1.0.0", 183 | "depth": 0, 184 | "source": "builtin", 185 | "dependencies": { 186 | "com.unity.modules.physics": "1.0.0", 187 | "com.unity.modules.terrain": "1.0.0" 188 | } 189 | }, 190 | "com.unity.modules.tilemap": { 191 | "version": "1.0.0", 192 | "depth": 0, 193 | "source": "builtin", 194 | "dependencies": { 195 | "com.unity.modules.physics2d": "1.0.0" 196 | } 197 | }, 198 | "com.unity.modules.ui": { 199 | "version": "1.0.0", 200 | "depth": 0, 201 | "source": "builtin", 202 | "dependencies": {} 203 | }, 204 | "com.unity.modules.uielements": { 205 | "version": "1.0.0", 206 | "depth": 0, 207 | "source": "builtin", 208 | "dependencies": { 209 | "com.unity.modules.ui": "1.0.0", 210 | "com.unity.modules.imgui": "1.0.0", 211 | "com.unity.modules.jsonserialize": "1.0.0", 212 | "com.unity.modules.uielementsnative": "1.0.0" 213 | } 214 | }, 215 | "com.unity.modules.uielementsnative": { 216 | "version": "1.0.0", 217 | "depth": 1, 218 | "source": "builtin", 219 | "dependencies": { 220 | "com.unity.modules.ui": "1.0.0", 221 | "com.unity.modules.imgui": "1.0.0", 222 | "com.unity.modules.jsonserialize": "1.0.0" 223 | } 224 | }, 225 | "com.unity.modules.umbra": { 226 | "version": "1.0.0", 227 | "depth": 0, 228 | "source": "builtin", 229 | "dependencies": {} 230 | }, 231 | "com.unity.modules.unityanalytics": { 232 | "version": "1.0.0", 233 | "depth": 0, 234 | "source": "builtin", 235 | "dependencies": { 236 | "com.unity.modules.unitywebrequest": "1.0.0", 237 | "com.unity.modules.jsonserialize": "1.0.0" 238 | } 239 | }, 240 | "com.unity.modules.unitywebrequest": { 241 | "version": "1.0.0", 242 | "depth": 0, 243 | "source": "builtin", 244 | "dependencies": {} 245 | }, 246 | "com.unity.modules.unitywebrequestassetbundle": { 247 | "version": "1.0.0", 248 | "depth": 0, 249 | "source": "builtin", 250 | "dependencies": { 251 | "com.unity.modules.assetbundle": "1.0.0", 252 | "com.unity.modules.unitywebrequest": "1.0.0" 253 | } 254 | }, 255 | "com.unity.modules.unitywebrequestaudio": { 256 | "version": "1.0.0", 257 | "depth": 0, 258 | "source": "builtin", 259 | "dependencies": { 260 | "com.unity.modules.unitywebrequest": "1.0.0", 261 | "com.unity.modules.audio": "1.0.0" 262 | } 263 | }, 264 | "com.unity.modules.unitywebrequesttexture": { 265 | "version": "1.0.0", 266 | "depth": 0, 267 | "source": "builtin", 268 | "dependencies": { 269 | "com.unity.modules.unitywebrequest": "1.0.0", 270 | "com.unity.modules.imageconversion": "1.0.0" 271 | } 272 | }, 273 | "com.unity.modules.unitywebrequestwww": { 274 | "version": "1.0.0", 275 | "depth": 0, 276 | "source": "builtin", 277 | "dependencies": { 278 | "com.unity.modules.unitywebrequest": "1.0.0", 279 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 280 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 281 | "com.unity.modules.audio": "1.0.0", 282 | "com.unity.modules.assetbundle": "1.0.0", 283 | "com.unity.modules.imageconversion": "1.0.0" 284 | } 285 | }, 286 | "com.unity.modules.vehicles": { 287 | "version": "1.0.0", 288 | "depth": 0, 289 | "source": "builtin", 290 | "dependencies": { 291 | "com.unity.modules.physics": "1.0.0" 292 | } 293 | }, 294 | "com.unity.modules.video": { 295 | "version": "1.0.0", 296 | "depth": 0, 297 | "source": "builtin", 298 | "dependencies": { 299 | "com.unity.modules.audio": "1.0.0", 300 | "com.unity.modules.ui": "1.0.0", 301 | "com.unity.modules.unitywebrequest": "1.0.0" 302 | } 303 | }, 304 | "com.unity.modules.vr": { 305 | "version": "1.0.0", 306 | "depth": 0, 307 | "source": "builtin", 308 | "dependencies": { 309 | "com.unity.modules.jsonserialize": "1.0.0", 310 | "com.unity.modules.physics": "1.0.0", 311 | "com.unity.modules.xr": "1.0.0" 312 | } 313 | }, 314 | "com.unity.modules.wind": { 315 | "version": "1.0.0", 316 | "depth": 0, 317 | "source": "builtin", 318 | "dependencies": {} 319 | }, 320 | "com.unity.modules.xr": { 321 | "version": "1.0.0", 322 | "depth": 0, 323 | "source": "builtin", 324 | "dependencies": { 325 | "com.unity.modules.physics": "1.0.0", 326 | "com.unity.modules.jsonserialize": "1.0.0", 327 | "com.unity.modules.subsystems": "1.0.0" 328 | } 329 | } 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 20 7 | productGUID: e6dcbec329a9cfd4b8039a6878345407 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: RubiksCube 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 1 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 1 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 1 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 0.1 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 30 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: {} 173 | buildNumber: {} 174 | AndroidBundleVersionCode: 1 175 | AndroidMinSdkVersion: 19 176 | AndroidTargetSdkVersion: 0 177 | AndroidPreferredInstallLocation: 1 178 | aotOptions: 179 | stripEngineCode: 1 180 | iPhoneStrippingLevel: 0 181 | iPhoneScriptCallOptimization: 0 182 | ForceInternetPermission: 0 183 | ForceSDCardPermission: 0 184 | CreateWallpaper: 0 185 | APKExpansionFiles: 0 186 | keepLoadedShadersAlive: 0 187 | StripUnusedMeshComponents: 1 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSTargetOSVersionString: 11.0 191 | tvOSSdkVersion: 0 192 | tvOSRequireExtendedGameController: 0 193 | tvOSTargetOSVersionString: 11.0 194 | uIPrerenderedIcon: 0 195 | uIRequiresPersistentWiFi: 0 196 | uIRequiresFullScreen: 1 197 | uIStatusBarHidden: 1 198 | uIExitOnSuspend: 0 199 | uIStatusBarStyle: 0 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 100 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 0 236 | iosCopyPluginsCodeInsteadOfSymlink: 0 237 | appleDeveloperTeamID: 238 | iOSManualSigningProvisioningProfileID: 239 | tvOSManualSigningProvisioningProfileID: 240 | iOSManualSigningProvisioningProfileType: 0 241 | tvOSManualSigningProvisioningProfileType: 0 242 | appleEnableAutomaticSigning: 0 243 | iOSRequireARKit: 0 244 | iOSAutomaticallyDetectAndAddCapabilities: 1 245 | appleEnableProMotion: 0 246 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 247 | templatePackageId: com.unity.template.3d@5.0.3 248 | templateDefaultScene: Assets/Scenes/SampleScene.unity 249 | AndroidTargetArchitectures: 1 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | AndroidMinifyWithR8: 0 267 | AndroidMinifyRelease: 0 268 | AndroidMinifyDebug: 0 269 | AndroidValidateAppBundleSize: 1 270 | AndroidAppBundleSizeToValidate: 150 271 | m_BuildTargetIcons: [] 272 | m_BuildTargetPlatformIcons: [] 273 | m_BuildTargetBatching: 274 | - m_BuildTarget: Standalone 275 | m_StaticBatching: 1 276 | m_DynamicBatching: 0 277 | - m_BuildTarget: tvOS 278 | m_StaticBatching: 1 279 | m_DynamicBatching: 0 280 | - m_BuildTarget: Android 281 | m_StaticBatching: 1 282 | m_DynamicBatching: 0 283 | - m_BuildTarget: iPhone 284 | m_StaticBatching: 1 285 | m_DynamicBatching: 0 286 | - m_BuildTarget: WebGL 287 | m_StaticBatching: 0 288 | m_DynamicBatching: 0 289 | m_BuildTargetGraphicsJobs: 290 | - m_BuildTarget: MacStandaloneSupport 291 | m_GraphicsJobs: 0 292 | - m_BuildTarget: Switch 293 | m_GraphicsJobs: 1 294 | - m_BuildTarget: MetroSupport 295 | m_GraphicsJobs: 1 296 | - m_BuildTarget: AppleTVSupport 297 | m_GraphicsJobs: 0 298 | - m_BuildTarget: BJMSupport 299 | m_GraphicsJobs: 1 300 | - m_BuildTarget: LinuxStandaloneSupport 301 | m_GraphicsJobs: 1 302 | - m_BuildTarget: PS4Player 303 | m_GraphicsJobs: 1 304 | - m_BuildTarget: iOSSupport 305 | m_GraphicsJobs: 0 306 | - m_BuildTarget: WindowsStandaloneSupport 307 | m_GraphicsJobs: 1 308 | - m_BuildTarget: XboxOnePlayer 309 | m_GraphicsJobs: 1 310 | - m_BuildTarget: LuminSupport 311 | m_GraphicsJobs: 0 312 | - m_BuildTarget: AndroidPlayer 313 | m_GraphicsJobs: 0 314 | - m_BuildTarget: WebGLSupport 315 | m_GraphicsJobs: 0 316 | m_BuildTargetGraphicsJobMode: 317 | - m_BuildTarget: PS4Player 318 | m_GraphicsJobMode: 0 319 | - m_BuildTarget: XboxOnePlayer 320 | m_GraphicsJobMode: 0 321 | m_BuildTargetGraphicsAPIs: 322 | - m_BuildTarget: AndroidPlayer 323 | m_APIs: 150000000b000000 324 | m_Automatic: 0 325 | - m_BuildTarget: iOSSupport 326 | m_APIs: 10000000 327 | m_Automatic: 1 328 | - m_BuildTarget: AppleTVSupport 329 | m_APIs: 10000000 330 | m_Automatic: 0 331 | - m_BuildTarget: WebGLSupport 332 | m_APIs: 0b000000 333 | m_Automatic: 1 334 | m_BuildTargetVRSettings: 335 | - m_BuildTarget: Standalone 336 | m_Enabled: 0 337 | m_Devices: 338 | - Oculus 339 | - OpenVR 340 | openGLRequireES31: 0 341 | openGLRequireES31AEP: 0 342 | openGLRequireES32: 0 343 | m_TemplateCustomTags: {} 344 | mobileMTRendering: 345 | Android: 1 346 | iPhone: 1 347 | tvOS: 1 348 | m_BuildTargetGroupLightmapEncodingQuality: [] 349 | m_BuildTargetGroupLightmapSettings: [] 350 | playModeTestRunnerEnabled: 0 351 | runPlayModeTestAsEditModeTest: 0 352 | actionOnDotNetUnhandledException: 1 353 | enableInternalProfiler: 0 354 | logObjCUncaughtExceptions: 1 355 | enableCrashReportAPI: 0 356 | cameraUsageDescription: 357 | locationUsageDescription: 358 | microphoneUsageDescription: 359 | switchNMETAOverride: 360 | switchNetLibKey: 361 | switchSocketMemoryPoolSize: 6144 362 | switchSocketAllocatorPoolSize: 128 363 | switchSocketConcurrencyLimit: 14 364 | switchScreenResolutionBehavior: 2 365 | switchUseCPUProfiler: 0 366 | switchUseGOLDLinker: 0 367 | switchApplicationID: 0x01004b9000490000 368 | switchNSODependencies: 369 | switchTitleNames_0: 370 | switchTitleNames_1: 371 | switchTitleNames_2: 372 | switchTitleNames_3: 373 | switchTitleNames_4: 374 | switchTitleNames_5: 375 | switchTitleNames_6: 376 | switchTitleNames_7: 377 | switchTitleNames_8: 378 | switchTitleNames_9: 379 | switchTitleNames_10: 380 | switchTitleNames_11: 381 | switchTitleNames_12: 382 | switchTitleNames_13: 383 | switchTitleNames_14: 384 | switchPublisherNames_0: 385 | switchPublisherNames_1: 386 | switchPublisherNames_2: 387 | switchPublisherNames_3: 388 | switchPublisherNames_4: 389 | switchPublisherNames_5: 390 | switchPublisherNames_6: 391 | switchPublisherNames_7: 392 | switchPublisherNames_8: 393 | switchPublisherNames_9: 394 | switchPublisherNames_10: 395 | switchPublisherNames_11: 396 | switchPublisherNames_12: 397 | switchPublisherNames_13: 398 | switchPublisherNames_14: 399 | switchIcons_0: {fileID: 0} 400 | switchIcons_1: {fileID: 0} 401 | switchIcons_2: {fileID: 0} 402 | switchIcons_3: {fileID: 0} 403 | switchIcons_4: {fileID: 0} 404 | switchIcons_5: {fileID: 0} 405 | switchIcons_6: {fileID: 0} 406 | switchIcons_7: {fileID: 0} 407 | switchIcons_8: {fileID: 0} 408 | switchIcons_9: {fileID: 0} 409 | switchIcons_10: {fileID: 0} 410 | switchIcons_11: {fileID: 0} 411 | switchIcons_12: {fileID: 0} 412 | switchIcons_13: {fileID: 0} 413 | switchIcons_14: {fileID: 0} 414 | switchSmallIcons_0: {fileID: 0} 415 | switchSmallIcons_1: {fileID: 0} 416 | switchSmallIcons_2: {fileID: 0} 417 | switchSmallIcons_3: {fileID: 0} 418 | switchSmallIcons_4: {fileID: 0} 419 | switchSmallIcons_5: {fileID: 0} 420 | switchSmallIcons_6: {fileID: 0} 421 | switchSmallIcons_7: {fileID: 0} 422 | switchSmallIcons_8: {fileID: 0} 423 | switchSmallIcons_9: {fileID: 0} 424 | switchSmallIcons_10: {fileID: 0} 425 | switchSmallIcons_11: {fileID: 0} 426 | switchSmallIcons_12: {fileID: 0} 427 | switchSmallIcons_13: {fileID: 0} 428 | switchSmallIcons_14: {fileID: 0} 429 | switchManualHTML: 430 | switchAccessibleURLs: 431 | switchLegalInformation: 432 | switchMainThreadStackSize: 1048576 433 | switchPresenceGroupId: 434 | switchLogoHandling: 0 435 | switchReleaseVersion: 0 436 | switchDisplayVersion: 1.0.0 437 | switchStartupUserAccount: 0 438 | switchTouchScreenUsage: 0 439 | switchSupportedLanguagesMask: 0 440 | switchLogoType: 0 441 | switchApplicationErrorCodeCategory: 442 | switchUserAccountSaveDataSize: 0 443 | switchUserAccountSaveDataJournalSize: 0 444 | switchApplicationAttribute: 0 445 | switchCardSpecSize: -1 446 | switchCardSpecClock: -1 447 | switchRatingsMask: 0 448 | switchRatingsInt_0: 0 449 | switchRatingsInt_1: 0 450 | switchRatingsInt_2: 0 451 | switchRatingsInt_3: 0 452 | switchRatingsInt_4: 0 453 | switchRatingsInt_5: 0 454 | switchRatingsInt_6: 0 455 | switchRatingsInt_7: 0 456 | switchRatingsInt_8: 0 457 | switchRatingsInt_9: 0 458 | switchRatingsInt_10: 0 459 | switchRatingsInt_11: 0 460 | switchRatingsInt_12: 0 461 | switchLocalCommunicationIds_0: 462 | switchLocalCommunicationIds_1: 463 | switchLocalCommunicationIds_2: 464 | switchLocalCommunicationIds_3: 465 | switchLocalCommunicationIds_4: 466 | switchLocalCommunicationIds_5: 467 | switchLocalCommunicationIds_6: 468 | switchLocalCommunicationIds_7: 469 | switchParentalControl: 0 470 | switchAllowsScreenshot: 1 471 | switchAllowsVideoCapturing: 1 472 | switchAllowsRuntimeAddOnContentInstall: 0 473 | switchDataLossConfirmation: 0 474 | switchUserAccountLockEnabled: 0 475 | switchSystemResourceMemory: 16777216 476 | switchSupportedNpadStyles: 22 477 | switchNativeFsCacheSize: 32 478 | switchIsHoldTypeHorizontal: 0 479 | switchSupportedNpadCount: 8 480 | switchSocketConfigEnabled: 0 481 | switchTcpInitialSendBufferSize: 32 482 | switchTcpInitialReceiveBufferSize: 64 483 | switchTcpAutoSendBufferSizeMax: 256 484 | switchTcpAutoReceiveBufferSizeMax: 256 485 | switchUdpSendBufferSize: 9 486 | switchUdpReceiveBufferSize: 42 487 | switchSocketBufferEfficiency: 4 488 | switchSocketInitializeEnabled: 1 489 | switchNetworkInterfaceManagerInitializeEnabled: 1 490 | switchPlayerConnectionEnabled: 1 491 | ps4NPAgeRating: 12 492 | ps4NPTitleSecret: 493 | ps4NPTrophyPackPath: 494 | ps4ParentalLevel: 11 495 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 496 | ps4Category: 0 497 | ps4MasterVersion: 01.00 498 | ps4AppVersion: 01.00 499 | ps4AppType: 0 500 | ps4ParamSfxPath: 501 | ps4VideoOutPixelFormat: 0 502 | ps4VideoOutInitialWidth: 1920 503 | ps4VideoOutBaseModeInitialWidth: 1920 504 | ps4VideoOutReprojectionRate: 60 505 | ps4PronunciationXMLPath: 506 | ps4PronunciationSIGPath: 507 | ps4BackgroundImagePath: 508 | ps4StartupImagePath: 509 | ps4StartupImagesFolder: 510 | ps4IconImagesFolder: 511 | ps4SaveDataImagePath: 512 | ps4SdkOverride: 513 | ps4BGMPath: 514 | ps4ShareFilePath: 515 | ps4ShareOverlayImagePath: 516 | ps4PrivacyGuardImagePath: 517 | ps4ExtraSceSysFile: 518 | ps4NPtitleDatPath: 519 | ps4RemotePlayKeyAssignment: -1 520 | ps4RemotePlayKeyMappingDir: 521 | ps4PlayTogetherPlayerCount: 0 522 | ps4EnterButtonAssignment: 1 523 | ps4ApplicationParam1: 0 524 | ps4ApplicationParam2: 0 525 | ps4ApplicationParam3: 0 526 | ps4ApplicationParam4: 0 527 | ps4DownloadDataSize: 0 528 | ps4GarlicHeapSize: 2048 529 | ps4ProGarlicHeapSize: 2560 530 | playerPrefsMaxSize: 32768 531 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 532 | ps4pnSessions: 1 533 | ps4pnPresence: 1 534 | ps4pnFriends: 1 535 | ps4pnGameCustomData: 1 536 | playerPrefsSupport: 0 537 | enableApplicationExit: 0 538 | resetTempFolder: 1 539 | restrictedAudioUsageRights: 0 540 | ps4UseResolutionFallback: 0 541 | ps4ReprojectionSupport: 0 542 | ps4UseAudio3dBackend: 0 543 | ps4UseLowGarlicFragmentationMode: 1 544 | ps4SocialScreenEnabled: 0 545 | ps4ScriptOptimizationLevel: 0 546 | ps4Audio3dVirtualSpeakerCount: 14 547 | ps4attribCpuUsage: 0 548 | ps4PatchPkgPath: 549 | ps4PatchLatestPkgPath: 550 | ps4PatchChangeinfoPath: 551 | ps4PatchDayOne: 0 552 | ps4attribUserManagement: 0 553 | ps4attribMoveSupport: 0 554 | ps4attrib3DSupport: 0 555 | ps4attribShareSupport: 0 556 | ps4attribExclusiveVR: 0 557 | ps4disableAutoHideSplash: 0 558 | ps4videoRecordingFeaturesUsed: 0 559 | ps4contentSearchFeaturesUsed: 0 560 | ps4CompatibilityPS5: 0 561 | ps4GPU800MHz: 1 562 | ps4attribEyeToEyeDistanceSettingVR: 0 563 | ps4IncludedModules: [] 564 | ps4attribVROutputEnabled: 0 565 | monoEnv: 566 | splashScreenBackgroundSourceLandscape: {fileID: 0} 567 | splashScreenBackgroundSourcePortrait: {fileID: 0} 568 | blurSplashScreenBackground: 1 569 | spritePackerPolicy: 570 | webGLMemorySize: 16 571 | webGLExceptionSupport: 1 572 | webGLNameFilesAsHashes: 0 573 | webGLDataCaching: 1 574 | webGLDebugSymbols: 0 575 | webGLEmscriptenArgs: 576 | webGLModulesDirectory: 577 | webGLTemplate: APPLICATION:Default 578 | webGLAnalyzeBuildSize: 0 579 | webGLUseEmbeddedResources: 0 580 | webGLCompressionFormat: 1 581 | webGLWasmArithmeticExceptions: 0 582 | webGLLinkerTarget: 1 583 | webGLThreadsSupport: 0 584 | webGLDecompressionFallback: 0 585 | scriptingDefineSymbols: {} 586 | platformArchitecture: {} 587 | scriptingBackend: {} 588 | il2cppCompilerConfiguration: {} 589 | managedStrippingLevel: {} 590 | incrementalIl2cppBuild: {} 591 | suppressCommonWarnings: 1 592 | allowUnsafeCode: 0 593 | useDeterministicCompilation: 1 594 | additionalIl2CppArgs: 595 | scriptingRuntimeVersion: 1 596 | gcIncremental: 1 597 | gcWBarrierValidation: 0 598 | apiCompatibilityLevelPerPlatform: {} 599 | m_RenderingPath: 1 600 | m_MobileRenderingPath: 1 601 | metroPackageName: Template_3D 602 | metroPackageVersion: 603 | metroCertificatePath: 604 | metroCertificatePassword: 605 | metroCertificateSubject: 606 | metroCertificateIssuer: 607 | metroCertificateNotAfter: 0000000000000000 608 | metroApplicationDescription: Template_3D 609 | wsaImages: {} 610 | metroTileShortName: 611 | metroTileShowName: 0 612 | metroMediumTileShowName: 0 613 | metroLargeTileShowName: 0 614 | metroWideTileShowName: 0 615 | metroSupportStreamingInstall: 0 616 | metroLastRequiredScene: 0 617 | metroDefaultTileSize: 1 618 | metroTileForegroundText: 2 619 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 620 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 621 | metroSplashScreenUseBackgroundColor: 0 622 | platformCapabilities: {} 623 | metroTargetDeviceFamilies: {} 624 | metroFTAName: 625 | metroFTAFileTypes: [] 626 | metroProtocolName: 627 | XboxOneProductId: 628 | XboxOneUpdateKey: 629 | XboxOneSandboxId: 630 | XboxOneContentId: 631 | XboxOneTitleId: 632 | XboxOneSCId: 633 | XboxOneGameOsOverridePath: 634 | XboxOnePackagingOverridePath: 635 | XboxOneAppManifestOverridePath: 636 | XboxOneVersion: 1.0.0.0 637 | XboxOnePackageEncryption: 0 638 | XboxOnePackageUpdateGranularity: 2 639 | XboxOneDescription: 640 | XboxOneLanguage: 641 | - enus 642 | XboxOneCapability: [] 643 | XboxOneGameRating: {} 644 | XboxOneIsContentPackage: 0 645 | XboxOneEnableGPUVariability: 1 646 | XboxOneSockets: {} 647 | XboxOneSplashScreen: {fileID: 0} 648 | XboxOneAllowedProductIds: [] 649 | XboxOnePersistentLocalStorageSize: 0 650 | XboxOneXTitleMemory: 8 651 | XboxOneOverrideIdentityName: 652 | XboxOneOverrideIdentityPublisher: 653 | vrEditorSettings: 654 | daydream: 655 | daydreamIconForeground: {fileID: 0} 656 | daydreamIconBackground: {fileID: 0} 657 | cloudServicesEnabled: 658 | UNet: 1 659 | luminIcon: 660 | m_Name: 661 | m_ModelFolderPath: 662 | m_PortalFolderPath: 663 | luminCert: 664 | m_CertPath: 665 | m_SignPackage: 1 666 | luminIsChannelApp: 0 667 | luminVersion: 668 | m_VersionCode: 1 669 | m_VersionName: 670 | apiCompatibilityLevel: 6 671 | cloudProjectId: 672 | framebufferDepthMemorylessMode: 0 673 | projectName: 674 | organizationId: 675 | cloudEnabled: 0 676 | enableNativePlatformBackendsForNewInputSystem: 0 677 | disableOldInputManagerSupport: 0 678 | legacyClampBlendShapeWeights: 0 679 | virtualTexturingSupportEnabled: 0 680 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.1.16f1 2 | m_EditorVersionWithRevision: 2020.1.16f1 (f483ad6465d6) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Layer 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RubiksCubeUnity-Tutorial 2 | ## Rubiks Cube Game with Solver. Tutorial by - Megalomobile. 3 | 4 | ![](https://github.com/hamzazmah/RubiksCubeUnity-Tutorial/blob/main/images/rubiks.PNG) 5 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | vcSharedLogLevel: 9 | value: 0d5e400f0650 10 | flags: 0 11 | m_VCAutomaticAdd: 1 12 | m_VCDebugCom: 0 13 | m_VCDebugCmd: 0 14 | m_VCDebugOut: 0 15 | m_SemanticMergeMode: 2 16 | m_VCShowFailedCheckout: 1 17 | m_VCOverwriteFailedCheckoutAssets: 1 18 | m_VCOverlayIcons: 1 19 | m_VCAllowAsyncUpdate: 0 20 | -------------------------------------------------------------------------------- /images/rubiks.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamzazmah/RubiksCubeUnity-Tutorial/2b35c8a5be8b3cf8804b1c3a6292c124dee5d0e3/images/rubiks.PNG --------------------------------------------------------------------------------