void DrawFilters() { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.BeginVertical("box", GUILayout.Width(300)); { EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckScaleFactor)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("1. Scale Factor is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckScaleFactor); } GUI.backgroundColor = Color.white; baseScaleFactor = EditorGUILayout.FloatField(baseScaleFactor, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckOptimizeMesh)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("4. Optimize Mesh is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckOptimizeMesh); } GUI.backgroundColor = Color.white; baseOptimizeMesh = (BOOL)EditorGUILayout.EnumPopup(baseOptimizeMesh, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckSwapUVs)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("7. Swap UVs is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckSwapUVs); } GUI.backgroundColor = Color.white; baseSwapUVs = (BOOL)EditorGUILayout.EnumPopup(baseSwapUVs, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckTangents)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("10. Tangents is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckTangents); } GUI.backgroundColor = Color.white; baseTangents = (TANGENTS)EditorGUILayout.EnumPopup(baseTangents, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckUVCount)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("13. UV-Count is more than", GUILayout.Width(200))) { SetCheckType(CheckType.CheckUVCount); } GUI.backgroundColor = Color.white; baseUVCount = (byte)EditorGUILayout.IntField((int)baseUVCount, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); //Index Format EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckIndexFormat)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("16. Index Format is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckIndexFormat); } GUI.backgroundColor = Color.white; baseIndexFormat = (ModelImporterIndexFormat)EditorGUILayout.EnumPopup(baseIndexFormat, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("box", GUILayout.Width(300)); { EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckMeshCompression)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("2. Mesh Compression is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckMeshCompression); } GUI.backgroundColor = Color.white; baseMeshCompression = (ModelImporterMeshCompression)EditorGUILayout.EnumPopup(baseMeshCompression, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckImportBlendShapes)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("5. Import BlendShapes is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckImportBlendShapes); } GUI.backgroundColor = Color.white; baseImportBlendShapes = (BOOL)EditorGUILayout.EnumPopup(baseImportBlendShapes, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); //EditorGUILayout.BeginHorizontal(); //{ // if (GetCheckType(CheckTypes, CheckType.CheckKeepQuads)) GUI.backgroundColor = Color.green; // if (GUILayout.Button("Keep Quads is not ", GUILayout.Width(200))) // SetCheckType(CheckType.CheckKeepQuads); // GUI.backgroundColor = Color.white; // baseKeepQuads = (BOOL)EditorGUILayout.EnumPopup(baseKeepQuads, GUILayout.Width(100)); //} //EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckGenerateLightmapUVs)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("8. Generate Lightmap UVs is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckGenerateLightmapUVs); } GUI.backgroundColor = Color.white; baseGenerateLightmapUVs = (BOOL)EditorGUILayout.EnumPopup(baseGenerateLightmapUVs, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckMaterialNaming)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("11. Material Naming is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckMaterialNaming); } GUI.backgroundColor = Color.white; baseMaterialName = (MATERIAL_NAMING)EditorGUILayout.EnumPopup(baseMaterialName, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckVertexColor)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("14. VertexColor Setting is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckVertexColor); } GUI.backgroundColor = Color.white; baseVertexColorSet = (BOOL)EditorGUILayout.EnumPopup(baseVertexColorSet, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); //Import Animation EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckImportAnimation)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("17. Import Animation is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckImportAnimation); } GUI.backgroundColor = Color.white; baseImportAnimation = (BOOL)EditorGUILayout.EnumPopup(baseImportAnimation, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("box", GUILayout.Width(300)); { EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckReadWriteEnabled)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("3. Read/Write Enabled is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckReadWriteEnabled); } GUI.backgroundColor = Color.white; baseReadWriteEnabled = (BOOL)EditorGUILayout.EnumPopup(baseReadWriteEnabled, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckGenerateColliders)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("6. Generate Colliders is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckGenerateColliders); } GUI.backgroundColor = Color.white; baseGenerateColliders = (BOOL)EditorGUILayout.EnumPopup(baseGenerateColliders, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckImportMaterials)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("9. Import Materials is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckImportMaterials); } GUI.backgroundColor = Color.white; baseImportMaterials = (BOOL)EditorGUILayout.EnumPopup(baseImportMaterials, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckMaterialSearch)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("12. MaterialSearch is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckMaterialSearch); } GUI.backgroundColor = Color.white; baseMaterialSearch = (MATERIAL_SEARCH)EditorGUILayout.EnumPopup(baseMaterialSearch, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { if (GetCheckType(CheckTypes, CheckType.CheckNormalsOption)) { GUI.backgroundColor = Color.green; } if (GUILayout.Button("15. Normars Option is not ", GUILayout.Width(200))) { SetCheckType(CheckType.CheckNormalsOption); } GUI.backgroundColor = Color.white; baseNormalsOption = (NORMALS)EditorGUILayout.EnumPopup(baseNormalsOption, GUILayout.Width(100)); } EditorGUILayout.EndHorizontal(); if (baseNormalsOption == NORMALS.Calculate) { EditorGUILayout.BeginHorizontal(); //GUI.enabled = baseNormalsOption == NORMALS.Calculate ? true : false; baseSmoothingAngle = (Byte)EditorGUILayout.IntSlider(baseSmoothingAngle, 0, 180, GUILayout.Width(300)); //GUI.enabled = true; EditorGUILayout.EndHorizontal(); } } EditorGUILayout.EndVertical(); } EditorGUILayout.EndHorizontal(); }
void LoadFilterOption() { try { FileStream fileStream = new FileStream(savePath + saveFileName, FileMode.Open); if (fileStream == null) { return; } using (fileStream) { byte[] _Loadfloat = new byte[4]; for (int i = 0; i < _Loadfloat.Length; ++i) { _Loadfloat[i] = (byte)fileStream.ReadByte(); } baseScaleFactor = BitConverter.ToSingle(_Loadfloat, 0); baseMeshCompression = (ModelImporterMeshCompression)fileStream.ReadByte(); baseReadWriteEnabled = (BOOL)fileStream.ReadByte(); baseOptimizeMesh = (BOOL)fileStream.ReadByte(); baseImportBlendShapes = (BOOL)fileStream.ReadByte(); baseGenerateColliders = (BOOL)fileStream.ReadByte(); //baseKeepQuads = (BOOL)fileStream.ReadByte(); baseSwapUVs = (BOOL)fileStream.ReadByte(); baseGenerateLightmapUVs = (BOOL)fileStream.ReadByte(); baseTangents = (TANGENTS)fileStream.ReadByte(); baseImportMaterials = (BOOL)fileStream.ReadByte(); baseMaterialName = (MATERIAL_NAMING)fileStream.ReadByte(); baseMaterialSearch = (MATERIAL_SEARCH)fileStream.ReadByte(); baseUVCount = (byte)fileStream.ReadByte(); baseVertexColorSet = (BOOL)fileStream.ReadByte(); baseNormalsOption = (NORMALS)fileStream.ReadByte(); baseSmoothingAngle = (Byte)fileStream.ReadByte(); baseIndexFormat = (ModelImporterIndexFormat)fileStream.ReadByte(); baseImportAnimation = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseMeshCompression = (ModelImporterMeshCompression)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseReadWriteEnabled = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseOptimizeMesh = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseImportBlendShapes = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseGenerateColliders = (BOOL)fileStream.ReadByte(); ////if (fileStream.Position < fileStream.Length) // //baseKeepQuads = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseSwapUVs = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseGenerateLightmapUVs = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseTangents = (TANGENTS)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseImportMaterials = (BOOL)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseMaterialName = (MATERIAL_NAMING)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseMaterialSearch = (MATERIAL_SEARCH)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseUVCount = (byte)fileStream.ReadByte(); //if (fileStream.Position < fileStream.Length) // baseVertexColorSet = (BOOL)fileStream.ReadByte(); } fileStream.Close(); } catch { } }