├── .gitignore ├── .gitmodules ├── Assets ├── MeshFragmentize.meta ├── MeshFragmentize │ ├── MeshFragmentizeReplacer.cs │ ├── MeshFragmentizeReplacer.cs.meta │ ├── MeshFragmentizer.cs │ ├── MeshFragmentizer.cs.meta │ ├── MeshFragmentizerEditor.cs │ └── MeshFragmentizerEditor.cs.meta ├── Packages.meta ├── Packages │ ├── unity-gist.meta │ └── unity-gist │ │ ├── Cginc.meta │ │ ├── Cginc │ │ ├── ConstantUtil.cginc │ │ ├── ConstantUtil.cginc.meta │ │ ├── EasingUtil.hlsl │ │ ├── EasingUtil.hlsl.meta │ │ ├── FunctionUtil.cginc │ │ ├── FunctionUtil.cginc.meta │ │ ├── GaussianBlur.cginc │ │ ├── GaussianBlur.cginc.meta │ │ ├── MatrixUtil.hlsl │ │ ├── MatrixUtil.hlsl.meta │ │ ├── OutlineDetect.hlsl │ │ ├── OutlineDetect.hlsl.meta │ │ ├── PhotoShopMath.cginc │ │ ├── PhotoShopMath.cginc.meta │ │ ├── QuaternionUtil.hlsl │ │ ├── QuaternionUtil.hlsl.meta │ │ ├── RandomUtil.cginc │ │ ├── RandomUtil.cginc.meta │ │ ├── RotationUtil.cginc │ │ ├── RotationUtil.cginc.meta │ │ ├── SimplexNoise.cginc │ │ └── SimplexNoise.cginc.meta │ │ ├── README.md │ │ ├── README.md.meta │ │ ├── Script.meta │ │ ├── Script │ │ ├── CameraController.cs │ │ ├── CameraController.cs.meta │ │ ├── ComputeBufferUtil.cs │ │ ├── ComputeBufferUtil.cs.meta │ │ ├── ComputeShaderUtil.cs │ │ ├── ComputeShaderUtil.cs.meta │ │ ├── DrawerUtil.cs │ │ ├── DrawerUtil.cs.meta │ │ ├── EasingUtil.cs │ │ ├── EasingUtil.cs.meta │ │ ├── JsonUtil.cs │ │ ├── JsonUtil.cs.meta │ │ ├── NetworkUtil.cs │ │ ├── NetworkUtil.cs.meta │ │ ├── ObjectPoolBuffer.cs │ │ ├── ObjectPoolBuffer.cs.meta │ │ ├── Recorder.cs │ │ ├── Recorder.cs.meta │ │ ├── RendertextureUtil.cs │ │ ├── RendertextureUtil.cs.meta │ │ ├── SimplexNoise.cs │ │ ├── SimplexNoise.cs.meta │ │ ├── SingletonMonoBehaviour.cs │ │ └── SingletonMonoBehaviour.cs.meta │ │ ├── UI.meta │ │ ├── UI │ │ ├── ConditionalHide.meta │ │ ├── ConditionalHide │ │ │ ├── ConditionalHideAttribute.cs │ │ │ ├── ConditionalHideAttribute.cs.meta │ │ │ ├── Editor.meta │ │ │ └── Editor │ │ │ │ ├── ConditionalHidePropertyDrawer.cs │ │ │ │ └── ConditionalHidePropertyDrawer.cs.meta │ │ ├── FoldoutScope.meta │ │ └── FoldoutScope │ │ │ ├── FoldoutScope.cs │ │ │ ├── FoldoutScope.cs.meta │ │ │ ├── GUIChangedScope.cs │ │ │ ├── GUIChangedScope.cs.meta │ │ │ ├── IndentScope.cs │ │ │ └── IndentScope.cs.meta │ │ ├── Wireframe.meta │ │ └── Wireframe │ │ ├── CustomLighting.cginc │ │ ├── CustomLighting.cginc.meta │ │ ├── CustomLighting.shader │ │ ├── CustomLighting.shader.meta │ │ ├── Tessellation.cginc │ │ ├── Tessellation.cginc.meta │ │ ├── Tessellation.shader │ │ ├── Tessellation.shader.meta │ │ ├── Wireframing.cginc │ │ ├── Wireframing.cginc.meta │ │ ├── Wireframing.shader │ │ └── Wireframing.shader.meta ├── Scenes.meta ├── Scenes │ ├── FragmentizeExample.cs │ ├── FragmentizeExample.cs.meta │ ├── FragmentizeExample.shader │ ├── FragmentizeExample.shader.meta │ ├── FragmentizeExample.unity │ ├── FragmentizeExample.unity.meta │ ├── SD_UnityChan.meta │ └── SD_UnityChan │ │ ├── SDUnityChan_AltMat.meta │ │ ├── SDUnityChan_AltMat │ │ ├── def_mat 1.mat │ │ ├── def_mat 1.mat.meta │ │ ├── hair_mat 1.mat │ │ ├── hair_mat 1.mat.meta │ │ ├── mouth_mat 1.mat │ │ ├── mouth_mat 1.mat.meta │ │ ├── nol_mat 1.mat │ │ ├── nol_mat 1.mat.meta │ │ ├── skin_mat 1.mat │ │ └── skin_mat 1.mat.meta │ │ ├── SD_unitychan.meta │ │ ├── SD_unitychan │ │ ├── Animations.meta │ │ ├── Animations │ │ │ ├── SD_unitychan_motion_humanoid.controller │ │ │ ├── SD_unitychan_motion_humanoid.controller.meta │ │ │ ├── SD_unitychan_motion_humanoid.fbx │ │ │ └── SD_unitychan_motion_humanoid.fbx.meta │ │ ├── FaceAnimations.meta │ │ ├── FaceAnimations │ │ │ ├── Generic.meta │ │ │ ├── Generic │ │ │ │ ├── angry@sd_generic.anim │ │ │ │ ├── angry@sd_generic.anim.meta │ │ │ │ ├── confuse@sd_generic.anim │ │ │ │ ├── confuse@sd_generic.anim.meta │ │ │ │ ├── damaged@sd_generic.anim │ │ │ │ ├── damaged@sd_generic.anim.meta │ │ │ │ ├── default@sd_generic.anim │ │ │ │ ├── default@sd_generic.anim.meta │ │ │ │ ├── eye_close@sd_generic.anim │ │ │ │ ├── eye_close@sd_generic.anim.meta │ │ │ │ ├── mth_L@sd_generic.anim │ │ │ │ ├── mth_L@sd_generic.anim.meta │ │ │ │ ├── mth_R@sd_generic.anim │ │ │ │ ├── mth_R@sd_generic.anim.meta │ │ │ │ ├── mth_a@sd_generic.anim │ │ │ │ ├── mth_a@sd_generic.anim.meta │ │ │ │ ├── mth_e@sd_generic.anim │ │ │ │ ├── mth_e@sd_generic.anim.meta │ │ │ │ ├── mth_i@sd_generic.anim │ │ │ │ ├── mth_i@sd_generic.anim.meta │ │ │ │ ├── mth_o@sd_generic.anim │ │ │ │ ├── mth_o@sd_generic.anim.meta │ │ │ │ ├── mth_u@sd_generic.anim │ │ │ │ ├── mth_u@sd_generic.anim.meta │ │ │ │ ├── relux@sd_generic.anim │ │ │ │ ├── relux@sd_generic.anim.meta │ │ │ │ ├── sad@sd_generic.anim │ │ │ │ ├── sad@sd_generic.anim.meta │ │ │ │ ├── scold@sd_generic.anim │ │ │ │ ├── scold@sd_generic.anim.meta │ │ │ │ ├── smile2@sd_generic.anim │ │ │ │ ├── smile2@sd_generic.anim.meta │ │ │ │ ├── smile@sd_generic.anim │ │ │ │ ├── smile@sd_generic.anim.meta │ │ │ │ ├── strain@sd_generic.anim │ │ │ │ ├── strain@sd_generic.anim.meta │ │ │ │ ├── surprise@sd_generic.anim │ │ │ │ └── surprise@sd_generic.anim.meta │ │ │ ├── Humanoid.meta │ │ │ ├── Humanoid │ │ │ │ ├── angry@sd_hmd.anim │ │ │ │ ├── angry@sd_hmd.anim.meta │ │ │ │ ├── confuse@sd_hmd.anim │ │ │ │ ├── confuse@sd_hmd.anim.meta │ │ │ │ ├── damaged@sd_hmd.anim │ │ │ │ ├── damaged@sd_hmd.anim.meta │ │ │ │ ├── default@sd_hmd.anim │ │ │ │ ├── default@sd_hmd.anim.meta │ │ │ │ ├── eye_close@sd_hmd.anim │ │ │ │ ├── eye_close@sd_hmd.anim.meta │ │ │ │ ├── mth_L@sd_hmd.anim │ │ │ │ ├── mth_L@sd_hmd.anim.meta │ │ │ │ ├── mth_R@sd_hmd.anim │ │ │ │ ├── mth_R@sd_hmd.anim.meta │ │ │ │ ├── mth_a@sd_hmd.anim │ │ │ │ ├── mth_a@sd_hmd.anim.meta │ │ │ │ ├── mth_e@sd_hmd.anim │ │ │ │ ├── mth_e@sd_hmd.anim.meta │ │ │ │ ├── mth_i@sd_hmd.anim │ │ │ │ ├── mth_i@sd_hmd.anim.meta │ │ │ │ ├── mth_o@sd_hmd.anim │ │ │ │ ├── mth_o@sd_hmd.anim.meta │ │ │ │ ├── mth_u@sd_hmd.anim │ │ │ │ ├── mth_u@sd_hmd.anim.meta │ │ │ │ ├── relux@sd_hmd.anim │ │ │ │ ├── relux@sd_hmd.anim.meta │ │ │ │ ├── sad@sd_hmd.anim │ │ │ │ ├── sad@sd_hmd.anim.meta │ │ │ │ ├── scold@sd_hmd.anim │ │ │ │ ├── scold@sd_hmd.anim.meta │ │ │ │ ├── smile2@sd_hmd.anim │ │ │ │ ├── smile2@sd_hmd.anim.meta │ │ │ │ ├── smile@sd_hmd.anim │ │ │ │ ├── smile@sd_hmd.anim.meta │ │ │ │ ├── strain@sd_hmd.anim │ │ │ │ ├── strain@sd_hmd.anim.meta │ │ │ │ ├── surprise@sd_hmd.anim │ │ │ │ └── surprise@sd_hmd.anim.meta │ │ │ ├── _faceOnly.mask │ │ │ └── _faceOnly.mask.meta │ │ ├── Models.meta │ │ └── Models │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── def_mat.mat │ │ │ ├── def_mat.mat.meta │ │ │ ├── hair_mat.mat │ │ │ ├── hair_mat.mat.meta │ │ │ ├── mouth_mat.mat │ │ │ ├── mouth_mat.mat.meta │ │ │ ├── nol_mat.mat │ │ │ ├── nol_mat.mat.meta │ │ │ ├── skin_mat.mat │ │ │ └── skin_mat.mat.meta │ │ │ ├── SD_unitychan_humanoid.fbx │ │ │ ├── SD_unitychan_humanoid.fbx.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ ├── ENV2.tga │ │ │ ├── ENV2.tga.meta │ │ │ ├── FO_CLOTH1.tga │ │ │ ├── FO_CLOTH1.tga.meta │ │ │ ├── FO_RIM1.tga │ │ │ ├── FO_RIM1.tga.meta │ │ │ ├── FO_SKIN1.tga │ │ │ ├── FO_SKIN1.tga.meta │ │ │ ├── utc_all2.tga │ │ │ ├── utc_all2.tga.meta │ │ │ ├── utc_nomal.tga │ │ │ ├── utc_nomal.tga.meta │ │ │ ├── utc_spec.tga │ │ │ └── utc_spec.tga.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ ├── AutoBlink.cs │ │ ├── AutoBlink.cs.meta │ │ ├── AutoBlinkforSD.cs │ │ ├── AutoBlinkforSD.cs.meta │ │ ├── CameraController.cs │ │ ├── CameraController.cs.meta │ │ ├── FaceUpdate.cs │ │ ├── FaceUpdate.cs.meta │ │ ├── IKCtrlRightHand.cs │ │ ├── IKCtrlRightHand.cs.meta │ │ ├── IKLookAt.cs │ │ ├── IKLookAt.cs.meta │ │ ├── IdleChanger.cs │ │ ├── IdleChanger.cs.meta │ │ ├── RandomWind.cs │ │ ├── RandomWind.cs.meta │ │ ├── SpringBone.cs │ │ ├── SpringBone.cs.meta │ │ ├── SpringCollider.cs │ │ ├── SpringCollider.cs.meta │ │ ├── SpringManager.cs │ │ ├── SpringManager.cs.meta │ │ ├── ThirdPersonCamera.cs │ │ ├── ThirdPersonCamera.cs.meta │ │ ├── UnityChanControlScriptWithRgidBody.cs │ │ └── UnityChanControlScriptWithRgidBody.cs.meta ├── UnIndexedMesh.meta └── UnIndexedMesh │ ├── _body_unindexed.asset │ ├── _body_unindexed.asset.meta │ ├── _eye_unindexed.asset │ ├── _eye_unindexed.asset.meta │ ├── _face_unindexed.asset │ └── _face_unindexed.asset.meta ├── LICENSE.md ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset ├── README.md ├── output.gif └── output.png /.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 | /[Cc]apture*/ 13 | /[Cc]apture_Girl/ 14 | /[Cc]apture_Dog/ 15 | /[Cc]apture_Rock/ 16 | /Recordings/ 17 | *.mov 18 | 19 | /.vscode/ 20 | # Never ignore Asset meta data 21 | !/[Aa]ssets/**/*.meta 22 | 23 | # Uncomment this line if you wish to ignore the asset store tools plugin 24 | # /[Aa]ssets/AssetStoreTools* 25 | 26 | # Autogenerated Jetbrains Rider plugin 27 | [Aa]ssets/Plugins/Editor/JetBrains* 28 | 29 | # Visual Studio cache directory 30 | .vs/ 31 | 32 | # Gradle cache directory 33 | .gradle/ 34 | 35 | # Autogenerated VS/MD/Consulo solution and project files 36 | ExportedObj/ 37 | .consulo/ 38 | *.csproj 39 | *.unityproj 40 | *.sln 41 | *.suo 42 | *.tmp 43 | *.user 44 | *.userprefs 45 | *.pidb 46 | *.booproj 47 | *.svd 48 | *.pdb 49 | *.mdb 50 | *.opendb 51 | *.VC.db 52 | 53 | # Unity3D generated meta files 54 | *.pidb.meta 55 | *.pdb.meta 56 | *.mdb.meta 57 | 58 | # Unity3D generated file on crash reports 59 | sysinfo.txt 60 | 61 | # Builds 62 | *.apk 63 | *.unitypackage 64 | 65 | # Crashlytics generated file 66 | crashlytics-build.properties -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Assets/Packages/unity-gist"] 2 | path = Assets/Packages/unity-gist 3 | url = https://github.com/komietty/unity-gist.git 4 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e193f3d760ba0043a927d48350a247c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizeReplacer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace remesher { 6 | public abstract class MeshFragmentizeReplacer : MonoBehaviour { 7 | protected List<(MeshFragmentizer mf, GameObject go)> mfs; 8 | 9 | protected virtual void Start() { 10 | mfs = new List<(MeshFragmentizer uim, GameObject go)>(); 11 | 12 | foreach (var f in GetComponentsInChildren()) { 13 | var g = f.gameObject; 14 | var m = new MeshFragmentizer(g); 15 | f.sharedMesh = m.mesh; 16 | mfs.Add((m, g)); 17 | } 18 | 19 | foreach (var s in GetComponentsInChildren()) { 20 | var g = s.gameObject; 21 | var m = new MeshFragmentizer(g); 22 | s.sharedMesh = m.mesh; 23 | mfs.Add((m, g)); 24 | } 25 | } 26 | 27 | protected virtual void OnDestroy() { 28 | mfs.ForEach(u => { 29 | u.mf.Dispose(); 30 | var filt = u.go.GetComponent(); 31 | var skin = u.go.GetComponent(); 32 | if (filt != null) filt.sharedMesh = u.mf.cache; 33 | if (skin != null) skin.sharedMesh = u.mf.cache; 34 | }); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizeReplacer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2b1ebe7ab5070e478cf086455e5aef7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using Unity.Collections; 3 | using System.Linq; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | 7 | namespace remesher { 8 | 9 | public class MeshFragmentizer : System.IDisposable { 10 | public Mesh mesh { get; private set; } 11 | public Mesh cache { get; private set; } 12 | 13 | // with animation controller vertex munipulation does not work correctly 14 | public NativeArray vertices_handler; 15 | public NativeArray vertices_cached; 16 | 17 | public MeshFragmentizer(GameObject root) { 18 | var filter = root.GetComponent(); 19 | var skin = root.GetComponent(); 20 | var mtxTRS = Matrix4x4.TRS(root.transform.position, root.transform.rotation, root.transform.localScale).inverse; 21 | cache = skin == null ? filter.sharedMesh : skin.sharedMesh; 22 | var new_vrts = new List(); 23 | mesh = Create(cache, out new_vrts); 24 | 25 | vertices_handler = new NativeArray(new_vrts.ToArray(), Allocator.Persistent); 26 | vertices_cached = new NativeArray(new_vrts.ToArray(), Allocator.Persistent); 27 | } 28 | 29 | public static Mesh Create(Mesh original, out List new_vrts_list) { 30 | var vrts = original.vertices; 31 | var tris = original.triangles; 32 | var uvs = original.uv; 33 | var nrms = original.normals; 34 | var tans = original.tangents; 35 | var bnws = original.boneWeights; 36 | var bdps = original.bindposes; 37 | var new_vrts = new Vector3[tris.Length]; 38 | var new_uvs = new Vector2[tris.Length]; 39 | var new_nrms = new Vector3[tris.Length]; 40 | var new_tans = new Vector3[tris.Length]; 41 | var new_tris = new int[tris.Length]; 42 | var new_bnws = new BoneWeight[tris.Length]; 43 | var mesh = GameObject.Instantiate(original); 44 | 45 | mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; 46 | 47 | for (int i = 0; i < tris.Length; i++) { 48 | var t = tris[i]; 49 | new_vrts[i] = vrts[t]; 50 | new_uvs[i] = uvs [t]; 51 | new_nrms[i] = nrms[t]; 52 | new_tans[i] = tans[t]; 53 | if (bnws.Length > 0) new_bnws[i] = bnws[t]; 54 | new_tris[i] = i; 55 | } 56 | 57 | mesh.vertices = new_vrts; 58 | mesh.triangles = new_tris; 59 | mesh.uv = new_uvs; 60 | mesh.boneWeights = new_bnws; 61 | mesh.bindposes = bdps; 62 | mesh.RecalculateNormals(); 63 | mesh.RecalculateTangents(); 64 | new_vrts_list = new_vrts.ToList(); 65 | return mesh; 66 | } 67 | 68 | public void UpdateVertices() { 69 | mesh.SetVertices(vertices_handler); 70 | } 71 | 72 | public void Dispose() { 73 | vertices_handler.Dispose(); 74 | vertices_cached.Dispose(); 75 | GameObject.Destroy(mesh); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36037b5cdf1c21642a24408e69eb1a66 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizerEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using UnityEngine; 6 | using UnityEditor; 7 | 8 | namespace remesher { 9 | public class MeshFragmentizerEditor : EditorWindow { 10 | 11 | public List meshes; 12 | string dir = "Assets/UnIndexedMesh"; 13 | 14 | [MenuItem("Custom/UnIndexedMesh")] 15 | static void Init() { 16 | GetWindow(typeof(MeshFragmentizer).Name); 17 | } 18 | 19 | void OnGUI() { 20 | EditorGUILayout.Space(); 21 | var serializedObj = new SerializedObject(this); 22 | EditorGUILayout.PropertyField(serializedObj.FindProperty("meshes"), true); 23 | serializedObj.ApplyModifiedProperties(); 24 | EditorGUILayout.Space(); 25 | 26 | if (GUILayout.Button("Generate")) { 27 | if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); 28 | meshes.ForEach(m => { 29 | var vts = new List(); 30 | var alt = MeshFragmentizer.Create(m, out vts); 31 | var pth = dir + "/" + m.name + "_unindexed" + ".asset"; 32 | CreateOrUpdate(alt, pth); 33 | }); 34 | ShowNotification(new GUIContent("SUCCESS : " + dir)); 35 | } 36 | 37 | } 38 | 39 | static void CreateOrUpdate(Object newAsset, string assetPath) { 40 | var oldAsset = AssetDatabase.LoadAssetAtPath(assetPath); 41 | if (oldAsset == null) { 42 | AssetDatabase.CreateAsset(newAsset, assetPath); 43 | } else { 44 | EditorUtility.CopySerializedIfDifferent(newAsset, oldAsset); 45 | AssetDatabase.SaveAssets(); 46 | } 47 | } 48 | 49 | } 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /Assets/MeshFragmentize/MeshFragmentizerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 140ad617d10d3b647a5e7a303e4943b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fb1321a5002145469e315319fd86e18 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9e2821f4ff89034182093ada8b2b504 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9141b5f1bed14d240867e4f6efa36f98 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/ConstantUtil.cginc: -------------------------------------------------------------------------------- 1 | #ifndef CONSTANT_UTIL 2 | #define CONSTANT_UTIL 3 | 4 | #define PI 3.14159265359 5 | #define PI2 6.283185307189 6 | #define E 2.71828182846 7 | 8 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/ConstantUtil.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fb0c8eb8b9094147a4fdd7a8a1b47f3 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/EasingUtil.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e702d6fc35063842b6ac1b45a2eba84 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/FunctionUtil.cginc: -------------------------------------------------------------------------------- 1 | #ifndef FUNCTION_UTIL 2 | #define FUNCTION_UTIL 3 | 4 | float pulse(float a, float b, float x) { 5 | return step(a, x) - step(b, x); 6 | } 7 | 8 | float smoothpulse(float a1, float a2, float b1, float b2, float x) { 9 | return smoothstep(a1, a2, x) - smoothstep(b1, b2, x); 10 | } 11 | 12 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/FunctionUtil.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56cdd9fab69856a418da8fd34c0f1322 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/GaussianBlur.cginc: -------------------------------------------------------------------------------- 1 | #ifndef GAUSSIANBLUR 2 | #define GAUSSIANBLUR 3 | #include "ConstantUtil.cginc" 4 | 5 | sampler2D _BlurTex; 6 | float4 DirectionalGaussianBlur(int samples, float2 dir, float SD, float blurSize, float aspct, float2 i_uv) 7 | { 8 | float invSamples = 1.0 / (samples - 1); 9 | float dispersion = SD * SD; 10 | float sum; 11 | float4 col; 12 | for (int i = 0; i < samples; i++) 13 | { 14 | float offset = (i * invSamples - 0.5) * blurSize * aspct; 15 | float2 uv = i_uv + dir * offset; 16 | float gauss = pow(E, -pow(offset, 2) / (2 * dispersion)) / sqrt(PI2 * dispersion); 17 | sum += gauss; 18 | col += tex2D(_BlurTex, uv) * gauss; 19 | } 20 | col /= sum; 21 | return col; 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/GaussianBlur.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d7138bced6b3c640929fb1d4b016217 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/MatrixUtil.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31aa1bd4bcd6a0e408db1314d773651a 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/OutlineDetect.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef EDGE_DRAW 2 | #define EDGE_DRAW 3 | 4 | float1 _Thick; 5 | float1 _EdgeThreshold; 6 | 7 | float OutlineDepth(float2 uv){ 8 | float tx = _CameraDepthTexture_TexelSize.x * _Thick; 9 | float ty = _CameraDepthTexture_TexelSize.y * _Thick; 10 | 11 | float col00 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_CameraDepthTexture, uv + half2(-tx, -ty)))); 12 | float col10 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_CameraDepthTexture, uv + half2( 0, -ty)))); 13 | float col01 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_CameraDepthTexture, uv + half2(-tx, 0)))); 14 | float col11 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_CameraDepthTexture, uv + half2( 0, 0)))); 15 | float val = (col00 - col11) * (col00 - col11) + (col10 - col01) * (col10 - col01); 16 | 17 | return (val < _EdgeThreshold) ? 1 : 0; 18 | } 19 | 20 | float OutlineColor(float2 uv){ 21 | float tx = _MainTex_TexelSize.x * _Thick; 22 | float ty = _MainTex_TexelSize.y * _Thick; 23 | 24 | float col00 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_MainTex, uv + half2(-tx, -ty)))); 25 | float col10 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_MainTex, uv + half2( 0, -ty)))); 26 | float col01 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_MainTex, uv + half2(-tx, 0)))); 27 | float col11 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_MainTex, uv + half2( 0, 0)))); 28 | float val = (col00 - col11) * (col00 - col11) + (col10 - col01) * (col10 - col01); 29 | 30 | return (val < _EdgeThreshold) ? 1 : 0; 31 | } 32 | 33 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/OutlineDetect.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c2e509fc3291fa42b827f4de9720cdf 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/PhotoShopMath.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a96d0ff47c1753e45a8f3695d7a1d97f 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/QuaternionUtil.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44875e06b6b75714eaf4424286bf03bf 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/RandomUtil.cginc: -------------------------------------------------------------------------------- 1 | #ifndef RANDOMUTIL 2 | #define RANDOMUTIL 3 | #include "ConstantUtil.cginc" 4 | inline float rnd(float2 p) { 5 | return frac(sin(dot(p, float2(12.9898, 78.233))) * 43758.5453); 6 | } 7 | inline float rnd(float2 uv, float salt) { 8 | uv += float2(salt, 0.0); 9 | return rnd(uv); 10 | } 11 | 12 | inline float3 rnd3(float2 p) { 13 | return 2.0 * (float3(rnd(p * 1), rnd(p * 2), rnd(p * 3)) - 0.5); 14 | } 15 | 16 | // alternative 17 | //float3 rnd3(float2 seed) { 18 | // float t = sin(seed.x + seed.y * 1e3); 19 | // return float3(frac(t * 1e4), frac(t * 1e6), frac(t * 1e5)); 20 | //} 21 | 22 | inline float rndSimple(float i) { 23 | return frac(sin(dot(float2(i, i * i) * 0.01, float2(12.9898, 78.233))) * 43758.5453); 24 | } 25 | inline float2 rndInsideCircle(float2 p) { 26 | float d = rnd(p.xy); 27 | float theta = rnd(p.yx) * PI * 2; 28 | return d * float2(cos(theta), sin(theta)); 29 | } 30 | 31 | float2 random_point_on_circle(float2 uv) 32 | { 33 | float theta = rnd(uv) * PI * 2; 34 | return float2(cos(theta), sin(theta)); 35 | } 36 | 37 | // Uniformaly distributed points on a unit sphere 38 | // http://mathworld.wolfram.com/SpherePointPicking.html 39 | float3 random_point_on_sphere(float2 uv) 40 | { 41 | float u = rnd(uv) * 2 - 1; 42 | float theta = rnd(uv + 0.333) * PI * 2; 43 | float u2 = sqrt(1 - u * u); 44 | return float3(u2 * cos(theta), u2 * sin(theta), u); 45 | } 46 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/RandomUtil.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b81b15c0d99f7044e9cf0370a7085899 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/RotationUtil.cginc: -------------------------------------------------------------------------------- 1 | #ifndef ROTATION_UTIL 2 | #define ROTATION_UTIL 3 | 4 | float4 rotate(float4 v, float angle, float3 axis) 5 | { 6 | float3 a = normalize(axis); 7 | float s = sin(angle); 8 | float c = cos(angle); 9 | float r = 1.0 - c; 10 | float3x3 m = float3x3( 11 | a.x * a.x * r + c, 12 | a.y * a.x * r + a.z * s, 13 | a.z * a.x * r - a.y * s, 14 | a.x * a.y * r - a.z * s, 15 | a.y * a.y * r + c, 16 | a.z * a.y * r + a.x * s, 17 | a.x * a.z * r + a.y * s, 18 | a.y * a.z * r - a.x * s, 19 | a.z * a.z * r + c 20 | ); 21 | return float4(mul(m, v.xyz), 1); 22 | } 23 | 24 | float4x4 rotateMtx(float angle, float axis) 25 | { 26 | float3 a = normalize(axis); 27 | float s = sin(angle); 28 | float c = cos(angle); 29 | float r = 1.0 - c; 30 | float4x4 m = float4x4( 31 | a.x * a.x * r + c, 32 | a.y * a.x * r + a.z * s, 33 | a.z * a.x * r - a.y * s, 34 | 0, 35 | a.x * a.y * r - a.z * s, 36 | a.y * a.y * r + c, 37 | a.z * a.y * r + a.x * s, 38 | 0, 39 | a.x * a.z * r + a.y * s, 40 | a.y * a.z * r - a.x * s, 41 | a.z * a.z * r + c, 42 | 0, 43 | 0, 44 | 0, 45 | 0, 46 | 0 47 | ); 48 | return m; 49 | } 50 | 51 | float2 rotate2D(float2 v, float theta) 52 | { 53 | return float2(v.x * cos(theta) - v.y * sin(theta), v.x * sin(theta) + v.y * cos(theta)); 54 | } 55 | 56 | float2 lookAt2D(float2 v, float2 currDir, float2 nextDir) 57 | { 58 | float theta = acos(dot(currDir, nextDir)); 59 | int sn = sign(cross(float3(currDir, 0), float3(nextDir, 0)).z); 60 | return rotate2D(v, sn * theta); 61 | } 62 | 63 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/RotationUtil.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 182f1b1e5dfa5e342b3083fc3d129700 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/SimplexNoise.cginc: -------------------------------------------------------------------------------- 1 | #ifndef NOISE4D_INCLUDED 2 | #define NOISE4D_INCLUDED 3 | 4 | float4 mod289(float4 x) { 5 | return x - floor(x * (1.0 / 289.0)) * 289.0; 6 | } 7 | 8 | float mod289(float x) { 9 | return x - floor(x * (1.0 / 289.0)) * 289.0; 10 | } 11 | 12 | float4 permute(float4 x) { 13 | return mod289(((x * 34.0) + 1.0) * x); 14 | } 15 | 16 | float permute(float x) { 17 | return mod289(((x * 34.0) + 1.0) * x); 18 | } 19 | 20 | float4 taylorInvSqrt(float4 r) { 21 | return 1.79284291400159 - 0.85373472095314 * r; 22 | } 23 | 24 | float taylorInvSqrt(float r) { 25 | return 1.79284291400159 - 0.85373472095314 * r; 26 | } 27 | 28 | float4 grad4(float j, float4 ip) { 29 | const float4 ones = float4(1.0, 1.0, 1.0, -1.0); 30 | float4 p, s; 31 | 32 | p.xyz = floor(frac((j).xxx * ip.xyz) * 7.0) * ip.z - 1.0; 33 | p.w = 1.5 - dot(abs(p.xyz), ones.xyz); 34 | s = float4(p < 0.0); 35 | p.xyz = p.xyz + (s.xyz * 2.0 - 1.0) * s.www; 36 | 37 | return p; 38 | } 39 | 40 | // (sqrt(5) - 1)/4 = F4, used once below 41 | #define F4 0.309016994374947451 42 | 43 | float snoise(float4 v) { 44 | const float4 C = float4(0.138196601125011, // (5 - sqrt(5))/20 G4 45 | 0.276393202250021, // 2 * G4 46 | 0.414589803375032, // 3 * G4 47 | -0.447213595499958); // -1 + 4 * G4 48 | 49 | // First corner 50 | float4 i = floor(v + dot(v, (F4).xxxx)); 51 | float4 x0 = v - i + dot(i, C.xxxx); 52 | 53 | // Other corners 54 | 55 | // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) 56 | float4 i0; 57 | float3 isX = step(x0.yzw, x0.xxx); 58 | float3 isYZ = step(x0.zww, x0.yyz); 59 | // i0.x = dot( isX, float3( 1.0 ) ); 60 | i0.x = isX.x + isX.y + isX.z; 61 | i0.yzw = 1.0 - isX; 62 | // i0.y += dot( isYZ.xy, float2( 1.0 ) ); 63 | i0.y += isYZ.x + isYZ.y; 64 | i0.zw += 1.0 - isYZ.xy; 65 | i0.z += isYZ.z; 66 | i0.w += 1.0 - isYZ.z; 67 | 68 | // i0 now contains the unique values 0,1,2,3 in each channel 69 | float4 i3 = clamp(i0, 0.0, 1.0); 70 | float4 i2 = clamp(i0 - 1.0, 0.0, 1.0); 71 | float4 i1 = clamp(i0 - 2.0, 0.0, 1.0); 72 | 73 | // x0 = x0 - 0.0 + 0.0 * C.xxxx 74 | // x1 = x0 - i1 + 1.0 * C.xxxx 75 | // x2 = x0 - i2 + 2.0 * C.xxxx 76 | // x3 = x0 - i3 + 3.0 * C.xxxx 77 | // x4 = x0 - 1.0 + 4.0 * C.xxxx 78 | float4 x1 = x0 - i1 + C.xxxx; 79 | float4 x2 = x0 - i2 + C.yyyy; 80 | float4 x3 = x0 - i3 + C.zzzz; 81 | float4 x4 = x0 + C.wwww; 82 | 83 | // Permutations 84 | i = mod289(i); 85 | float j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); 86 | float4 j1 = permute(permute(permute(permute( 87 | i.w + float4(i1.w, i2.w, i3.w, 1.0)) 88 | + i.z + float4(i1.z, i2.z, i3.z, 1.0)) 89 | + i.y + float4(i1.y, i2.y, i3.y, 1.0)) 90 | + i.x + float4(i1.x, i2.x, i3.x, 1.0)); 91 | 92 | // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope 93 | // 7*7*6 = 294, which is close to the ring size 17*17 = 289. 94 | float4 ip = float4(1.0 / 294.0, 1.0 / 49.0, 1.0 / 7.0, 0.0); 95 | 96 | float4 p0 = grad4(j0, ip); 97 | float4 p1 = grad4(j1.x, ip); 98 | float4 p2 = grad4(j1.y, ip); 99 | float4 p3 = grad4(j1.z, ip); 100 | float4 p4 = grad4(j1.w, ip); 101 | 102 | // Normalise gradients 103 | float4 norm = taylorInvSqrt(float4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); 104 | p0 *= norm.x; 105 | p1 *= norm.y; 106 | p2 *= norm.z; 107 | p3 *= norm.w; 108 | p4 *= taylorInvSqrt(dot(p4, p4)); 109 | 110 | // Mix contributions from the five corners 111 | float3 m0 = max(0.6 - float3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), 0.0); 112 | float2 m1 = max(0.6 - float2(dot(x3, x3), dot(x4, x4)), 0.0); 113 | m0 = m0 * m0; 114 | m1 = m1 * m1; 115 | return 49.0 * (dot(m0 * m0, float3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) 116 | + dot(m1 * m1, float2(dot(p3, x3), dot(p4, x4)))); 117 | 118 | } 119 | 120 | float2 snoise2D(float4 x) { 121 | float s = snoise(x); 122 | float s1 = snoise(float4(x.y - 19.1, x.z + 33.4, x.x + 47.2, x.w)); 123 | float2 c = float2(s, s1); 124 | return c; 125 | } 126 | 127 | float3 snoise3D(float4 x) { 128 | float s = snoise(x); 129 | float s1 = snoise(float4(x.y - 19.1, x.z + 33.4, x.x + 47.2, x.w)); 130 | float s2 = snoise(float4(x.z + 74.2, x.x - 124.5, x.y + 99.4, x.w)); 131 | float3 c = float3(s, s1, s2); 132 | return c; 133 | } 134 | 135 | float3 curlNoise(float4 p) { 136 | const float e = 0.0009765625; 137 | float4 dx = float4(e, 0.0, 0.0, 0.0); 138 | float4 dy = float4(0.0, e, 0.0, 0.0); 139 | float4 dz = float4(0.0, 0.0, e, 0.0); 140 | 141 | float3 p_x0 = snoise3D(p - dx); 142 | float3 p_x1 = snoise3D(p + dx); 143 | float3 p_y0 = snoise3D(p - dy); 144 | float3 p_y1 = snoise3D(p + dy); 145 | float3 p_z0 = snoise3D(p - dz); 146 | float3 p_z1 = snoise3D(p + dz); 147 | 148 | float x = p_y1.z - p_y0.z - p_z1.y + p_z0.y; 149 | float y = p_z1.x - p_z0.x - p_x1.z + p_x0.z; 150 | float z = p_x1.y - p_x0.y - p_y1.x + p_y0.x; 151 | 152 | const float divisor = 1.0 / (2.0 * e); 153 | return normalize(float3(x, y, z) * divisor); 154 | } 155 | 156 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Cginc/SimplexNoise.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de7eacdf601156746abfbda6be044212 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/README.md: -------------------------------------------------------------------------------- 1 | If you use this repository as submodule, type below 2 | 3 | `git submodule add https://github.com/komietty/unity-gist.git Assets/Packages/unity-gist` 4 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95e99ae5e3a1c3343a29ff758e1bf386 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d1a620d33f4c4f4d9aa8bfa6c2202d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/CameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a41e77ad39f68bf4cb7bce254042dbb7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ComputeBufferUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace kmty.gist { 5 | 6 | public class ComputeBufferUtil { 7 | 8 | static public void Dispose(ComputeBuffer buff) { 9 | if (buff != null) { 10 | buff.Release(); 11 | buff = null; 12 | } 13 | } 14 | static public void Swap(ref ComputeBuffer src, ref ComputeBuffer dst) { 15 | ComputeBuffer tmp = src; 16 | src = dst; 17 | dst = tmp; 18 | } 19 | } 20 | 21 | public class PingPongBuffer : System.IDisposable { 22 | 23 | protected ComputeBuffer buffer0, buffer1; 24 | public ComputeBuffer Read => buffer0; 25 | public ComputeBuffer Write => buffer1; 26 | 27 | public PingPongBuffer(int count, int stride, ComputeBufferType type = ComputeBufferType.Default) { 28 | buffer0 = new ComputeBuffer(count, stride, type); 29 | buffer1 = new ComputeBuffer(count, stride, type); 30 | } 31 | public void SetData(Array data) { 32 | buffer0.SetData(data); 33 | buffer1.SetData(data); 34 | } 35 | public void SetCounterValue(uint counter) { 36 | buffer0.SetCounterValue(counter); 37 | buffer1.SetCounterValue(counter); 38 | } 39 | public void Swap() { 40 | var tmp = buffer0; 41 | buffer0 = buffer1; 42 | buffer1 = tmp; 43 | } 44 | public void Dispose() { 45 | buffer0.Dispose(); 46 | buffer1.Dispose(); 47 | } 48 | public static implicit operator ComputeBuffer(PingPongBuffer buf) => buf.Read; 49 | } 50 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ComputeBufferUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 726c9d40e5d91b843b646ef90d80969c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ComputeShaderUtil.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace kmty.gist { 4 | public static class ComputeShaderUtil { 5 | public static void Dispatch1D(ComputeShader compute, int kernel, int count) { 6 | uint tx, ty, tz; 7 | compute.GetKernelThreadGroupSizes(kernel, out tx, out ty, out tz); 8 | compute.Dispatch(kernel, GetKernelBlock(count, (int)tx), (int)ty, (int)tz); 9 | } 10 | public static void Dispatch2D(ComputeShader compute, int kernel, int width, int height) { 11 | uint tx, ty, tz; 12 | compute.GetKernelThreadGroupSizes(kernel, out tx, out ty, out tz); 13 | compute.Dispatch(kernel, GetKernelBlock(width, (int)tx), GetKernelBlock(height, (int)ty), 1); 14 | } 15 | public static void Dispatch3D(ComputeShader compute, int kernel, int width, int height, int depth) { 16 | uint tx, ty, tz; 17 | compute.GetKernelThreadGroupSizes(kernel, out tx, out ty, out tz); 18 | compute.Dispatch(kernel, GetKernelBlock(width, (int)tx), GetKernelBlock(height, (int)ty), GetKernelBlock(depth, (int)tz)); 19 | } 20 | static int GetKernelBlock(int count, int blockSize) => (count + blockSize - 1) / blockSize; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ComputeShaderUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 033e235d002040043902d59bf1144f8a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/DrawerUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39dda1612c82755459f3fb194c493cbe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/EasingUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 774a92f23684e144885e69d6a8885025 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/JsonUtil.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.IO; 3 | 4 | namespace kmty.gist { 5 | public static class JsonUtil { 6 | public static string LoadData(string filename) { 7 | var path = Path.Combine(Application.streamingAssetsPath, filename); 8 | var text = ""; 9 | if (File.Exists(path)) text = File.ReadAllText(path); 10 | else Debug.LogWarning(path + " is not found"); 11 | return text; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/JsonUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfa1b0a75c2146945bbb074c317d9379 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/NetworkUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Net; 3 | using System.Net.Sockets; 4 | 5 | namespace kmty.gist { 6 | public static class NetworkUtils { 7 | 8 | public static IPAddress GetLocalIPAddress() { 9 | if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) return null; 10 | 11 | IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); 12 | 13 | return host.AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/NetworkUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe41e2b141e42174e83d4e9dbaf5c608 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ObjectPoolBuffer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace kmty.gist { 4 | 5 | public class ObjectPoolBuffer : System.IDisposable { 6 | 7 | public ComputeBuffer PoolBuffer => poolBuffer; 8 | public ComputeBuffer CountBuffer => countBuffer; 9 | 10 | protected ComputeBuffer poolBuffer, countBuffer; 11 | public uint[] countArgs = new uint[] { 1, 1, 0, 0, 0 }; 12 | 13 | public ObjectPoolBuffer(int count) { 14 | poolBuffer = new ComputeBuffer(count, sizeof(int), ComputeBufferType.Append); 15 | poolBuffer.SetCounterValue(0); 16 | countBuffer = new ComputeBuffer(5, sizeof(uint), ComputeBufferType.IndirectArguments); 17 | countBuffer.SetData(countArgs); 18 | } 19 | 20 | public uint CopyPoolSize(bool copyToInstanceCounter = false) { 21 | int offset = copyToInstanceCounter ? 1 : 0; 22 | countBuffer.SetData(countArgs); 23 | ComputeBuffer.CopyCount(poolBuffer, countBuffer, offset * 4); 24 | countBuffer.GetData(countArgs); 25 | return countArgs[offset]; 26 | } 27 | 28 | public void Rest() { 29 | poolBuffer.SetCounterValue(0); 30 | countArgs = new uint[] { 1, 1, 0, 0, 0 }; 31 | countBuffer.SetData(countArgs); 32 | } 33 | 34 | public virtual void Dispose() { 35 | poolBuffer.Dispose(); 36 | countBuffer.Dispose(); 37 | } 38 | } 39 | } 40 | 41 | // memo 42 | // IndirectArguments Buffer layout 43 | //0:3 IndexCountPerInstance 44 | //4:7 InstanceCount 45 | //8:11 StartIndexLocation 46 | //12:15 BaseVertexLocation 47 | //16:19 StartInstanceLocation 48 | //20:35 Padding 49 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/ObjectPoolBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 804c16e270af8fa4f815560518392cda 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/Recorder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace kmty.gist { 4 | public class Recorder : MonoBehaviour { 5 | 6 | public string folderName; 7 | public int framerate = 60; 8 | public int maxRecordSeconds = 180; 9 | public bool recode = false; 10 | int frameCount; 11 | 12 | void Start() { 13 | if (recode) StartRecording(); 14 | } 15 | 16 | public void StartRecording() { 17 | System.IO.Directory.CreateDirectory(folderName); 18 | Time.captureFramerate = framerate; 19 | frameCount = -1; 20 | } 21 | 22 | void Update() { 23 | if (!string.IsNullOrEmpty(folderName) && frameCount > 0 && frameCount < framerate * maxRecordSeconds && recode) 24 | ScreenCapture.CaptureScreenshot($"{folderName}/frame{frameCount.ToString("0000")}.png"); 25 | frameCount++; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/Recorder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f73ff8ca4e52ae84194c193074d5a8f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/RendertextureUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using UnityEngine; 4 | 5 | namespace kmty.gist { 6 | public class RenderTextureUtil { 7 | static public void Build(ref RenderTexture tgt, int w, int h, int d = 0, bool randomWrite = true, RenderTextureFormat f = 0) { 8 | if (tgt != null) { 9 | UnityEngine.Object.Destroy(tgt); 10 | tgt = null; 11 | } 12 | tgt = new RenderTexture(w, h, d, f); 13 | tgt.enableRandomWrite = randomWrite; 14 | tgt.Create(); 15 | } 16 | static public void Rebuild(RenderTexture src, ref RenderTexture tgt) { 17 | if (src != null && (tgt == null || tgt.width != src.width || tgt.height != src.height)) 18 | Build(ref tgt, src.width, src.height, src.depth, src.enableRandomWrite, src.format); 19 | } 20 | static public void Clear(RenderTexture tgt) { 21 | if (tgt == null) return; 22 | var store = RenderTexture.active; 23 | RenderTexture.active = tgt; 24 | GL.Clear(true, true, Color.clear); 25 | RenderTexture.active = store; 26 | } 27 | static public void Destroy(RenderTexture tgt) { 28 | if (tgt != null) { 29 | UnityEngine.Object.Destroy(tgt); 30 | tgt = null; 31 | } 32 | } 33 | static public void savePng(RenderTexture rt, string path) { 34 | Texture2D tex = new Texture2D(rt.width, rt.height, TextureFormat.RGB24, false); 35 | RenderTexture.active = rt; 36 | tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); 37 | tex.Apply(); 38 | byte[] bytes = tex.EncodeToPNG(); 39 | UnityEngine.Object.Destroy(tex); 40 | File.WriteAllBytes(Application.dataPath + $"{path}.png", bytes); 41 | } 42 | } 43 | 44 | public class PingPongRenderTexture : IDisposable { 45 | protected RenderTexture rt0, rt1; 46 | public RenderTexture Read => rt0; 47 | public RenderTexture Write => rt1; 48 | 49 | public PingPongRenderTexture(int w, int h, int depth, RenderTextureFormat format, FilterMode filter = FilterMode.Point) { 50 | 51 | rt0 = new RenderTexture(w, h, depth, format) { 52 | filterMode = filter, 53 | wrapMode = TextureWrapMode.Clamp, 54 | hideFlags = HideFlags.HideAndDontSave, 55 | enableRandomWrite = true 56 | }; 57 | rt1 = new RenderTexture(w, h, depth, format) { 58 | filterMode = filter, 59 | wrapMode = TextureWrapMode.Clamp, 60 | hideFlags = HideFlags.HideAndDontSave, 61 | enableRandomWrite = true 62 | }; 63 | rt0.Create(); 64 | rt1.Create(); 65 | } 66 | 67 | public PingPongRenderTexture(RenderTexture rt) { 68 | rt0 = new RenderTexture(rt); 69 | rt1 = new RenderTexture(rt); 70 | rt0.Create(); 71 | rt1.Create(); 72 | } 73 | 74 | public void Copy() { 75 | Graphics.Blit(rt0, rt1); 76 | } 77 | 78 | public void Swap() { 79 | var tmp = rt0; 80 | rt0 = rt1; 81 | rt1 = tmp; 82 | } 83 | 84 | public void Dispose() { 85 | RenderTextureUtil.Destroy(rt0); 86 | RenderTextureUtil.Destroy(rt1); 87 | } 88 | 89 | public static implicit operator RenderTexture(PingPongRenderTexture prt) => prt.Read; 90 | } 91 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/RendertextureUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caf842787bda4074ea654f1b93d19a52 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/SimplexNoise.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb7469c897df9834eb17784c730b553f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/SingletonMonoBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace kmty.gist { 4 | public abstract class SingletonMonoBehaviour : MonoBehaviour where T : SingletonMonoBehaviour { 5 | static T instance; 6 | bool _inited = false; 7 | 8 | public static T Instance { 9 | get { 10 | if (instance == null) { 11 | instance = (T)FindObjectOfType(typeof(T)); 12 | if (instance == null) Debug.LogWarning(typeof(T) + " is nothing"); 13 | } 14 | return instance; 15 | } 16 | } 17 | 18 | public static T GetInstance() => instance; 19 | 20 | protected virtual void Awake() { 21 | CheckInstance(); 22 | SingletonInitialize(); 23 | } 24 | 25 | bool CheckInstance() { 26 | if (instance == null) { 27 | instance = (T)this; 28 | return true; 29 | } 30 | else if (Instance == this) return true; 31 | 32 | Destroy(this); 33 | return false; 34 | } 35 | void SingletonInitialize() { 36 | if (_inited == false) _inited = true; 37 | 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Script/SingletonMonoBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4240c5df62d9e7b47aeba4a1b33d567c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c576a00ea5a6874790a372761444740 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66b3203b0fc6cfb45b9e5453eab2a3f7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide/ConditionalHideAttribute.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | 4 | namespace kmty.gist { 5 | [HelpURL("http://www.brechtos.com/hiding-or-disabling-inspector-properties-using-propertydrawers-within-unity-5/")] 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Struct, Inherited = true)] 7 | public class ConditionalHideAttribute : PropertyAttribute { 8 | //The name of the bool field that will be in control 9 | public string ConditionalSourceField = ""; 10 | //TRUE = Hide in inspector / FALSE = Disable in inspector 11 | public bool HideInInspector = false; 12 | 13 | public ConditionalHideAttribute(string conditionalSourceField) { 14 | this.ConditionalSourceField = conditionalSourceField; 15 | this.HideInInspector = false; 16 | } 17 | 18 | public ConditionalHideAttribute(string conditionalSourceField, bool hideInInspector) { 19 | this.ConditionalSourceField = conditionalSourceField; 20 | this.HideInInspector = hideInInspector; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide/ConditionalHideAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79f14d85c2047d14e9075612d89b035e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a596bbb5e0f74d249b3d5f7c020acb44 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide/Editor/ConditionalHidePropertyDrawer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace kmty.gist { 5 | [HelpURL("http://www.brechtos.com/hiding-or-disabling-inspector-properties-using-propertydrawers-within-unity-5/")] 6 | [CustomPropertyDrawer(typeof(ConditionalHideAttribute))] 7 | public class ConditionalHidePropertyDrawer : PropertyDrawer { 8 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { 9 | ConditionalHideAttribute condHAtt = (ConditionalHideAttribute)attribute; 10 | bool enabled = GetConditionalHideAttributeResult(condHAtt, property); 11 | 12 | bool wasEnabled = GUI.enabled; 13 | GUI.enabled = enabled; 14 | if (!condHAtt.HideInInspector || enabled) { 15 | EditorGUI.PropertyField(position, property, label, true); 16 | } 17 | GUI.enabled = wasEnabled; 18 | } 19 | 20 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { 21 | ConditionalHideAttribute condHAtt = (ConditionalHideAttribute)attribute; 22 | bool enabled = GetConditionalHideAttributeResult(condHAtt, property); 23 | 24 | if (!condHAtt.HideInInspector || enabled) { 25 | return EditorGUI.GetPropertyHeight(property, label); 26 | } else { 27 | return -EditorGUIUtility.standardVerticalSpacing; 28 | } 29 | } 30 | 31 | private bool GetConditionalHideAttributeResult(ConditionalHideAttribute condHAtt, SerializedProperty property) { 32 | bool enabled = true; 33 | string propertyPath = property.propertyPath; //returns the property path of the property we want to apply the attribute to 34 | string conditionPath = propertyPath.Replace(property.name, condHAtt.ConditionalSourceField); //changes the path to the conditionalsource property path 35 | SerializedProperty sourcePropertyValue = property.serializedObject.FindProperty(conditionPath); 36 | 37 | if (sourcePropertyValue != null) { 38 | enabled = sourcePropertyValue.boolValue; 39 | } else { 40 | Debug.LogWarning("Attempting to use a ConditionalHideAttribute but no matching SourcePropertyValue found in object: " + condHAtt.ConditionalSourceField); 41 | } 42 | 43 | return enabled; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/ConditionalHide/Editor/ConditionalHidePropertyDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5693ef06e2553904d842c40c69db086d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fec98e48924b4f6282d93124d597919 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/FoldoutScope.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace kmty.gist { 4 | 5 | public class FoldoutScope : System.IDisposable { 6 | public const char CHAR_OPEN = '▼'; 7 | public const char CHAR_CLOSE = '▶'; 8 | 9 | protected GUIStyle foldoutStyle; 10 | 11 | public FoldoutScope(ref bool visible, string title = "") { 12 | 13 | if (foldoutStyle == null) 14 | foldoutStyle = new GUIStyle(UnityEngine.GUI.skin.label) { 15 | alignment = TextAnchor.MiddleLeft 16 | }; 17 | var foldoutTitle = (visible ? CHAR_OPEN : CHAR_CLOSE) + title; 18 | visible = GUILayout.Toggle(visible, foldoutTitle, foldoutStyle, GUILayout.ExpandWidth(false)); 19 | } 20 | 21 | public void Dispose() { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/FoldoutScope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 855a42b6b397c504bb1bfa588a76ddf5 3 | timeCreated: 1520428044 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/GUIChangedScope.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace kmty.gist { 3 | 4 | public class GUIChangedScope : System.IDisposable { 5 | protected bool initialState; 6 | protected System.Action callIfChnaged; 7 | 8 | public GUIChangedScope(System.Action callIfChnaged) { 9 | this.callIfChnaged = callIfChnaged; 10 | initialState = UnityEngine.GUI.changed; 11 | UnityEngine.GUI.changed = false; 12 | } 13 | 14 | public void Dispose() { 15 | if (UnityEngine.GUI.changed) 16 | callIfChnaged(); 17 | UnityEngine.GUI.changed = UnityEngine.GUI.changed || initialState; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/GUIChangedScope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84fb3bcec8d051a4a982326b3d8cf795 3 | timeCreated: 1520847976 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/IndentScope.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace kmty.gist { 6 | 7 | public class IndentScope : System.IDisposable { 8 | 9 | public IndentScope(float pixels = 10f) { 10 | GUILayout.BeginHorizontal(); 11 | GUILayout.Space(pixels); 12 | GUILayout.BeginVertical(); 13 | } 14 | 15 | public void Dispose() { 16 | GUILayout.EndVertical(); 17 | GUILayout.EndHorizontal(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/UI/FoldoutScope/IndentScope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f0156ddf3d93cc4a9b6545d2a51812b 3 | timeCreated: 1520426277 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8365bd50ffca0946bbb047abecd324a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/CustomLighting.cginc: -------------------------------------------------------------------------------- 1 | #ifndef CUSTOM_LIGHTING_INCLUDED 2 | #define CUSTOM_LIGHTING_INCLUDED 3 | 4 | #include "UnityPBSLighting.cginc" 5 | #include "AutoLight.cginc" 6 | 7 | sampler2D _MainTex; 8 | float4 _MainTex_ST; 9 | float _Smoothness; 10 | float4 _ATint; 11 | float _Metallic; 12 | 13 | struct appdata 14 | { 15 | float4 vertex : POSITION; 16 | float3 normal : NORMAL; 17 | float2 uv : TEXCOORD0; 18 | }; 19 | 20 | struct v2f 21 | { 22 | float4 vertex : SV_POSITION; 23 | float2 uv : TEXCOORD0; 24 | float3 normal : TEXCOORD1; 25 | float3 wpos : TEXCOORD2; 26 | #if defined(VERTEXLIGHT_ON) 27 | float3 vertexLightColor : TEXCOORD3; 28 | #endif 29 | }; 30 | 31 | void ComputeVertexLightColor (inout v2f i) 32 | { 33 | #if defined(VERTEXLIGHT_ON) 34 | i.vertexLightColor = Shade4PointLights( 35 | unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, 36 | unity_LightColor[0].rgb, unity_LightColor[1].rgb, 37 | unity_LightColor[2].rgb, unity_LightColor[3].rgb, 38 | unity_4LightAtten0, i.worldPos, i.normal 39 | ); 40 | #endif 41 | }; 42 | 43 | v2f vert (appdata v) 44 | { 45 | v2f o; 46 | o.vertex = UnityObjectToClipPos(v.vertex); 47 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 48 | o.normal = UnityObjectToWorldNormal(v.normal); 49 | o.wpos = mul(unity_ObjectToWorld, v.vertex); 50 | ComputeVertexLightColor(o); 51 | return o; 52 | } 53 | 54 | UnityLight CreateLight (v2f i) 55 | { 56 | UnityLight light; 57 | #if defined(POINT) || defined(SPOT) || defined(POINT_COOKIE) 58 | light.dir = normalize(_WorldSpaceLightPos0.xyz - i.wpos); 59 | #else 60 | light.dir = _WorldSpaceLightPos0.xyz; 61 | #endif 62 | 63 | UNITY_LIGHT_ATTENUATION(attenuation, 0, i.wpos); 64 | light.color = _LightColor0.rgb * attenuation; 65 | light.ndotl = DotClamped(i.normal, light.dir); 66 | return light; 67 | }; 68 | 69 | UnityIndirect CreateIndirectLight (v2f i) 70 | { 71 | UnityIndirect indirectLight; 72 | indirectLight.diffuse = 0; 73 | indirectLight.specular = 0; 74 | 75 | #if defined(VERTEXLIGHT_ON) 76 | indirectLight.diffuse = i.vertexLightColor; 77 | #endif 78 | #if defined(FORWARD_BASE_PASS) 79 | indirectLight.diffuse += max(0, ShadeSH9(float4(i.normal, 1))); 80 | #endif 81 | 82 | return indirectLight; 83 | }; 84 | 85 | fixed4 frag (v2f i) : SV_Target 86 | { 87 | i.normal = normalize(i.normal); 88 | float3 albedo = tex2D(_MainTex, i.uv).rgb * _ATint.rgb; 89 | float3 viewerDir = normalize(_WorldSpaceCameraPos - i.wpos); 90 | float3 specularTint; 91 | float oneMinusReflectivity; 92 | 93 | albedo = DiffuseAndSpecularFromMetallic(albedo, _Metallic, specularTint, oneMinusReflectivity); 94 | 95 | return UNITY_BRDF_PBS( 96 | albedo, 97 | specularTint, 98 | oneMinusReflectivity, 99 | _Smoothness, 100 | i.normal, 101 | viewerDir, 102 | CreateLight(i), 103 | CreateIndirectLight(i) 104 | ); 105 | } 106 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/CustomLighting.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67b328d8c18d5d7428b390445de47844 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/CustomLighting.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/CustomLighting" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Albedo", 2D) = "white" {} 6 | _Smoothness ("Smoothness", Range(0, 1)) = 0.5 7 | _ATint ("ATint", Color) = (1, 1, 1, 1) 8 | [Gamma]_Metallic ("Metallic", Range(0, 1)) = 0.5 9 | } 10 | SubShader 11 | { 12 | Pass 13 | { 14 | Tags {"LightMode" = "ForwardBase"} 15 | 16 | CGPROGRAM 17 | #pragma target 3.0 18 | #pragma multi_compile _ VERTEXLIGHT_ON 19 | #pragma vertex vert 20 | #pragma fragment frag 21 | #define FORWARD_BASE_PASS 22 | #include "CustomLighting.cginc" 23 | ENDCG 24 | } 25 | 26 | Pass 27 | { 28 | Tags {"LightMode" = "ForwardAdd"} 29 | Blend One One 30 | ZWrite Off 31 | 32 | CGPROGRAM 33 | #pragma target 3.0 34 | #pragma multi_compile_fwdadd 35 | #pragma vertex vert 36 | #pragma fragment frag 37 | #include "CustomLighting.cginc" 38 | ENDCG 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/CustomLighting.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1864894953bca5d4e8c42c4298e5e423 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Tessellation.cginc: -------------------------------------------------------------------------------- 1 | #ifndef TESSELLATION_INCLUDED 2 | #define TESSELLATION_INCLUDED 3 | 4 | #include "UnityCG.cginc" 5 | 6 | float3 _WireframeColor; 7 | float _WireframeSmoothing; 8 | float _WireframeThickness; 9 | float _Tesselletionfactor0; 10 | float _Tesselletionfactor1; 11 | float _TessellationEdgeLen; 12 | 13 | struct VertexData 14 | { 15 | UNITY_VERTEX_INPUT_INSTANCE_ID 16 | float4 vertex : POSITION; 17 | float3 normal : NORMAL; 18 | float4 tangent : TANGENT; 19 | float2 uv1 : TEXCOORD1; 20 | float2 uv2 : TEXCOORD2; 21 | }; 22 | 23 | struct v2t 24 | { 25 | float4 vertex : INTERNALTESSPOS; 26 | float3 normal : NORMAL; 27 | float4 tangent : TANGENT; 28 | float2 uv1 : TEXCOORD1; 29 | float2 uv2 : TEXCOORD2; 30 | }; 31 | 32 | struct t2g 33 | { 34 | float4 vertex : SV_POSITION; 35 | float3 normal : TEXCOORD3; 36 | float3 wpos : TEXCOORD4; 37 | }; 38 | 39 | struct TessellationFactors 40 | { 41 | float edge[3] : SV_TessFactor; 42 | float inside : SV_InsideTessFactor; 43 | }; 44 | 45 | struct g2f 46 | { 47 | t2g data; 48 | float2 barycentricCoordinates : TEXCOORD5; 49 | }; 50 | 51 | v2t vert (VertexData v) 52 | { 53 | v2t p; 54 | p.vertex = v.vertex; 55 | p.normal = v.normal; 56 | p.tangent = v.tangent; 57 | p.uv1 = v.uv1; 58 | p.uv2 = v.uv2; 59 | return p; 60 | } 61 | 62 | [UNITY_domain("tri")] 63 | [UNITY_outputcontrolpoints(3)] 64 | [UNITY_outputtopology("triangle_cw")] 65 | [UNITY_partitioning("fractional_even")] 66 | [UNITY_patchconstantfunc("MyPatchConstantFunction")] 67 | v2t hurl (InputPatch patch, uint id : SV_OutputControlPointID) 68 | { 69 | return patch[id]; 70 | } 71 | 72 | float TessellationEdgeFactor (v2t cp0, v2t cp1) 73 | { 74 | #if defined(_TESSELLATION_EDGE) 75 | float3 p0 = mul(unity_ObjectToWorld, float4(cp0.vertex.xyz, 1)).xyz; 76 | float3 p1 = mul(unity_ObjectToWorld, float4(cp1.vertex.xyz, 1)).xyz; 77 | float edgeLength = distance(p0, p1); 78 | return edgeLength / _TessellationEdgeLen; 79 | #else 80 | return _Tesselletionfactor0; 81 | #endif 82 | } 83 | 84 | TessellationFactors MyPatchConstantFunction (InputPatch patch) 85 | { 86 | TessellationFactors f; 87 | f.edge[0] = TessellationEdgeFactor(patch[1], patch[2]); 88 | f.edge[1] = TessellationEdgeFactor(patch[2], patch[0]); 89 | f.edge[2] = TessellationEdgeFactor(patch[0], patch[1]); 90 | f.inside = (f.edge[0] + f.edge[1] + f.edge[2]) * (1 / 3.0); 91 | return f; 92 | } 93 | 94 | [UNITY_domain("tri")] 95 | t2g dmin (TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation) 96 | { 97 | VertexData data; 98 | #define MY_DOMAIN_PROGRAM_INTERPOLATE(fieldName) data.fieldName = patch[0].fieldName * barycentricCoordinates.x + patch[1].fieldName * barycentricCoordinates.y + patch[2].fieldName * barycentricCoordinates.z; 99 | MY_DOMAIN_PROGRAM_INTERPOLATE(vertex) 100 | MY_DOMAIN_PROGRAM_INTERPOLATE(normal) 101 | MY_DOMAIN_PROGRAM_INTERPOLATE(tangent) 102 | MY_DOMAIN_PROGRAM_INTERPOLATE(uv1) 103 | MY_DOMAIN_PROGRAM_INTERPOLATE(uv2) 104 | 105 | t2g o; 106 | o.vertex = UnityObjectToClipPos(data.vertex); 107 | o.normal = UnityObjectToWorldNormal(data.normal); 108 | o.wpos = mul(unity_ObjectToWorld, data.vertex); 109 | return o; 110 | } 111 | 112 | [maxvertexcount(3)] 113 | void geom (triangle t2g i[3], inout TriangleStream stream) 114 | { 115 | float3 p0 = i[0].wpos; 116 | float3 p1 = i[1].wpos; 117 | float3 p2 = i[2].wpos; 118 | float3 triangleNormal = normalize(cross(p1 - p0, p2 - p0)); 119 | 120 | g2f g0, g1, g2; 121 | g0.data = i[0]; 122 | g1.data = i[1]; 123 | g2.data = i[2]; 124 | g0.data.normal = triangleNormal; 125 | g1.data.normal = triangleNormal; 126 | g2.data.normal = triangleNormal; 127 | g0.barycentricCoordinates = float2(1, 0); 128 | g1.barycentricCoordinates = float2(0, 1); 129 | g2.barycentricCoordinates = float2(0, 0); 130 | stream.Append(g0); 131 | stream.Append(g1); 132 | stream.Append(g2); 133 | } 134 | 135 | fixed4 frag (g2f i) : SV_Target 136 | { 137 | i.data.normal = normalize(i.data.normal); 138 | float3 barys; 139 | barys.xy = i.barycentricCoordinates; 140 | barys.z = 1 - barys.x - barys.y; 141 | float3 deltas = fwidth(barys); 142 | float3 smoothing = deltas * _WireframeSmoothing; 143 | float3 thickness = deltas * _WireframeThickness; 144 | barys = smoothstep(thickness, thickness + smoothing, barys); 145 | float minBary = min(barys.x, min(barys.y, barys.z)); 146 | return float4(lerp(_WireframeColor, 0, minBary), 1.0); 147 | } 148 | 149 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Tessellation.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b95198c8cd3900408cd84e0579968c3 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Tessellation.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Tessellation" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Albedo", 2D) = "white" {} 6 | _Smoothness ("Smoothness", Range(0, 1)) = 0.5 7 | _ATint ("ATint", Color) = (1, 1, 1, 1) 8 | [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0.5 9 | _WireframeColor ("Wireframe Color", Color) = (0, 0, 0) 10 | _WireframeSmoothing ("Wireframe Smoothing", Range(0, 10)) = 1 11 | _WireframeThickness ("Wireframe Thickness", Range(0, 10)) = 1 12 | _Tesselletionfactor0 ("TesselletionFactor0", Range(1, 64)) = 1.0 13 | _Tesselletionfactor1 ("TesselletionFactor1", Range(1, 64)) = 1.0 14 | _TessellationEdgeLen ("Tessellation Edge Length", Range(0.1, 1)) = 0.5 15 | 16 | } 17 | SubShader 18 | { 19 | Pass 20 | { 21 | CGPROGRAM 22 | #pragma target 4.6 23 | #pragma shader_feature _TESSELLATION_EDGE 24 | #include "Tessellation.cginc" 25 | #define _TESSELLATION_EDGE true 26 | #pragma vertex vert 27 | #pragma hull hurl 28 | #pragma domain dmin 29 | #pragma geometry geom 30 | #pragma fragment frag 31 | ENDCG 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Tessellation.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12b97dc475ffe714e87b511a723bc73b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Wireframing.cginc: -------------------------------------------------------------------------------- 1 | #ifndef WIREFRAMING_INCLUDED 2 | #define WIREFRAMING_INCLUDED 3 | 4 | #include "UnityCG.cginc" 5 | 6 | float3 _WireframeColor; 7 | float _WireframeSmoothing; 8 | float _WireframeThickness; 9 | 10 | struct appdata 11 | { 12 | float4 vertex : POSITION; 13 | float3 normal : NORMAL; 14 | }; 15 | 16 | struct v2g 17 | { 18 | float4 vertex : SV_POSITION; 19 | float3 normal : TEXCOORD0; 20 | float3 wpos : TEXCOORD1; 21 | }; 22 | 23 | struct g2f 24 | { 25 | v2g data; 26 | float2 barycentricCoordinates : TEXCOORD2; 27 | }; 28 | 29 | v2g vert (appdata v) 30 | { 31 | v2g o; 32 | o.vertex = UnityObjectToClipPos(v.vertex); 33 | o.normal = UnityObjectToWorldNormal(v.normal); 34 | o.wpos = mul(unity_ObjectToWorld, v.vertex); 35 | return o; 36 | } 37 | 38 | [maxvertexcount(3)] 39 | void geom (triangle v2g i[3], inout TriangleStream stream) 40 | { 41 | float3 p0 = i[0].wpos; 42 | float3 p1 = i[1].wpos; 43 | float3 p2 = i[2].wpos; 44 | float3 triangleNormal = normalize(cross(p1 - p0, p2 - p0)); 45 | 46 | g2f g0, g1, g2; 47 | g0.data = i[0]; 48 | g1.data = i[1]; 49 | g2.data = i[2]; 50 | 51 | g0.data.normal = triangleNormal; 52 | g1.data.normal = triangleNormal; 53 | g2.data.normal = triangleNormal; 54 | 55 | g0.barycentricCoordinates = float2(1, 0); 56 | g1.barycentricCoordinates = float2(0, 1); 57 | g2.barycentricCoordinates = float2(0, 0); 58 | 59 | stream.Append(g0); 60 | stream.Append(g1); 61 | stream.Append(g2); 62 | } 63 | 64 | float4 frag (g2f i) : SV_Target 65 | { 66 | i.data.normal = normalize(i.data.normal); 67 | float3 albedo = 0; 68 | float3 barys; 69 | barys.xy = i.barycentricCoordinates; 70 | barys.z = 1 - barys.x - barys.y; 71 | float3 deltas = fwidth(barys); 72 | float3 smoothing = deltas * _WireframeSmoothing; 73 | float3 thickness = deltas * _WireframeThickness; 74 | barys = smoothstep(thickness, thickness + smoothing, barys); 75 | float minBary = min(barys.x, min(barys.y, barys.z)); 76 | return float4(lerp(_WireframeColor, albedo, minBary).xyz, 1.0); 77 | } 78 | 79 | #endif -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Wireframing.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc73d49ba33915045952bec9d9ecc36c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Wireframing.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Wireframing" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Albedo", 2D) = "white" {} 6 | _Smoothness ("Smoothness", Range(0, 1)) = 0.5 7 | _ATint ("ATint", Color) = (1, 1, 1, 1) 8 | [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0.5 9 | _WireframeColor ("Wireframe Color", Color) = (0, 0, 0) 10 | _WireframeSmoothing ("Wireframe Smoothing", Range(0, 10)) = 1 11 | _WireframeThickness ("Wireframe Thickness", Range(0, 10)) = 1 12 | } 13 | SubShader 14 | { 15 | Pass 16 | { 17 | Tags {"LightMode" = "ForwardBase"} 18 | 19 | CGPROGRAM 20 | #pragma target 3.0 21 | #pragma multi_compile _ VERTEXLIGHT_ON 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | #define FORWARD_BASE_PASS 25 | #include "CustomLighting.cginc" 26 | ENDCG 27 | } 28 | 29 | Pass 30 | { 31 | Tags {"LightMode" = "ForwardAdd"} 32 | Blend One One 33 | ZWrite Off 34 | 35 | CGPROGRAM 36 | #pragma target 3.0 37 | #pragma multi_compile_fwdadd 38 | #pragma vertex vert 39 | #pragma fragment frag 40 | #include "CustomLighting.cginc" 41 | ENDCG 42 | } 43 | 44 | Pass 45 | { 46 | Blend SrcColor OneMinusSrcColor 47 | 48 | CGPROGRAM 49 | #pragma target 4.0 50 | #include "Wireframing.cginc" 51 | #pragma vertex vert 52 | #pragma geometry geom 53 | #pragma fragment frag 54 | ENDCG 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/Packages/unity-gist/Wireframe/Wireframing.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91b846f6589dd2f41b4f83859e8bc622 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5a7b8c52ea4e124797aeec84a0fbec3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/FragmentizeExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | using kmty.gist.easing; 6 | 7 | 8 | namespace remesher { 9 | public class FragmentizeExample : MeshFragmentizeReplacer { 10 | [SerializeField] protected Transform targetTRS; 11 | protected List<(SkinnedMeshRenderer skin, MaterialPropertyBlock mpb)> packs; 12 | protected Vector3 deltaPos; 13 | protected Vector3 diff; 14 | 15 | protected override void Start() { 16 | base.Start(); 17 | packs = new List<(SkinnedMeshRenderer, MaterialPropertyBlock)>(); 18 | var skins = GetComponentsInChildren().ToList(); 19 | skins.ForEach(s => packs.Add((s, new MaterialPropertyBlock()))); 20 | diff = targetTRS.position - transform.position; 21 | } 22 | 23 | void Update() { 24 | float time = Time.time * 0.5f; 25 | float c = -Mathf.Cos(time); 26 | float t = c * 0.5f + 0.5f; 27 | deltaPos = Vector3.Lerp(Vector3.zero, diff, Easing.Quadratic.InOut(t)); 28 | foreach (var p in packs) { 29 | p.skin.GetPropertyBlock(p.mpb); 30 | p.mpb.SetVector("_DeltaPos", deltaPos); 31 | p.mpb.SetFloat("_NoiseCoef", 1 - Mathf.Abs(c)); 32 | p.skin.SetPropertyBlock(p.mpb); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Scenes/FragmentizeExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1c475f74fb53eb47aac97740d5375f6 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/FragmentizeExample.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/FragmentizeExample" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Albedo", 2D) = "white" {} 6 | _Smoothness ("Smoothness", Range(0, 1)) = 0.5 7 | _ATint ("ATint", Color) = (1, 1, 1, 1) 8 | [Gamma]_Metallic ("Metallic", Range(0, 1)) = 0.5 9 | } 10 | SubShader 11 | { 12 | Pass 13 | { 14 | Tags { "RenderType"="Opaque" "LightMode" = "ForwardBase"} 15 | LOD 100 16 | CGPROGRAM 17 | #pragma target 3.0 18 | #pragma multi_compile _ VERTEXLIGHT_ON 19 | #define FORWARD_BASE_PASS 20 | #pragma vertex vert_remesh 21 | #pragma fragment frag 22 | #include "UnityCG.cginc" 23 | #include "/Assets/Packages/unity-gist/Cginc/SimplexNoise.cginc" 24 | #include "/Assets/Packages/unity-gist/Wireframe/CustomLighting.cginc" 25 | 26 | float _Amount; 27 | float3 _DeltaPos; 28 | float _NoiseCoef; 29 | v2f vert_remesh (appdata v, uint vid : SV_VertexID) { 30 | v2f o; 31 | uint tid = (uint)vid / 3; 32 | o.wpos = mul(unity_ObjectToWorld, v.vertex); 33 | o.wpos += _DeltaPos; 34 | o.wpos += snoise3D(tid) * _NoiseCoef * 0.5; 35 | o.vertex = mul(UNITY_MATRIX_VP, float4(o.wpos, 1.0)); 36 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 37 | o.normal = UnityObjectToWorldNormal(v.normal); 38 | ComputeVertexLightColor(o); 39 | return o; 40 | } 41 | ENDCG 42 | } 43 | Pass { 44 | Tags {"LightMode" = "ForwardAdd"} 45 | Blend One One 46 | ZWrite Off 47 | 48 | CGPROGRAM 49 | #pragma target 3.0 50 | #pragma multi_compile_fwdadd 51 | #pragma vertex vert 52 | #pragma fragment frag 53 | #include "/Assets/Packages/unity-gist/Wireframe/CustomLighting.cginc" 54 | ENDCG 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Scenes/FragmentizeExample.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09cd1ac8eac39b84b89f67e44c98926c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/FragmentizeExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e22bb5b48ba97435ab1891ac2638c592 3 | folderAsset: yes 4 | timeCreated: 1487141854 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb1ec05974687cd43ba0c159490933d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/def_mat 1.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: def_mat 1 11 | m_Shader: {fileID: 4800000, guid: 09cd1ac8eac39b84b89f67e44c98926c, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _Metallic: 0 50 | - _Smoothness: 1 51 | - _SpecularPower: 20 52 | - _WireframeSmoothing: 0 53 | - _WireframeThickness: 0.7 54 | m_Colors: 55 | - _ATint: {r: 1, g: 1, b: 1, a: 1} 56 | - _Color: {r: 1, g: 1, b: 1, a: 1} 57 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 58 | - _WireframeColor: {r: 1, g: 1, b: 1, a: 1} 59 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/def_mat 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9ffc15303eace0459cb6d4cda8dc7fd 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/hair_mat 1.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: hair_mat 1 11 | m_Shader: {fileID: 4800000, guid: 09cd1ac8eac39b84b89f67e44c98926c, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _Metallic: 0 50 | - _Smoothness: 1 51 | - _SpecularPower: 20 52 | - _WireframeSmoothing: 0 53 | - _WireframeThickness: 0.7 54 | m_Colors: 55 | - _ATint: {r: 1, g: 1, b: 1, a: 1} 56 | - _Color: {r: 1, g: 1, b: 1, a: 1} 57 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 58 | - _WireframeColor: {r: 1, g: 1, b: 1, a: 1} 59 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/hair_mat 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f5c910c8dcec6a43a6f8f3b6d8e4b43 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/mouth_mat 1.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: mouth_mat 1 11 | m_Shader: {fileID: 4800000, guid: 09cd1ac8eac39b84b89f67e44c98926c, type: 3} 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 | - _FalloffSampler: 23 | m_Texture: {fileID: 2800000, guid: 940d3c904d88ec743a6d6e7ac7e7937e, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _RimLightSampler: 31 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | m_Floats: 35 | - _DepthBias: 0.00012 36 | - _EdgeThickness: 1 37 | - _Metallic: 0 38 | - _Smoothness: 1 39 | - _WireframeSmoothing: 0 40 | - _WireframeThickness: 0.7 41 | m_Colors: 42 | - _ATint: {r: 1, g: 1, b: 1, a: 1} 43 | - _Color: {r: 1, g: 1, b: 1, a: 1} 44 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 45 | - _WireframeColor: {r: 1, g: 1, b: 1, a: 1} 46 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/mouth_mat 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74addffc05c0d9b4e9571514a3766cc0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/nol_mat 1.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: nol_mat 1 11 | m_Shader: {fileID: 4800000, guid: 09cd1ac8eac39b84b89f67e44c98926c, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _Metallic: 0 50 | - _Smoothness: 1 51 | - _SpecularPower: 20 52 | - _WireframeSmoothing: 0 53 | - _WireframeThickness: 0.7 54 | m_Colors: 55 | - _ATint: {r: 1, g: 1, b: 1, a: 1} 56 | - _Color: {r: 1, g: 1, b: 1, a: 1} 57 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 58 | - _WireframeColor: {r: 1, g: 1, b: 1, a: 1} 59 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/nol_mat 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d24c1386615820f4b96f34181b94a588 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/skin_mat 1.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: skin_mat 1 11 | m_Shader: {fileID: 4800000, guid: 09cd1ac8eac39b84b89f67e44c98926c, type: 3} 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 | - _FalloffSampler: 23 | m_Texture: {fileID: 2800000, guid: 940d3c904d88ec743a6d6e7ac7e7937e, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _RimLightSampler: 31 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | m_Floats: 35 | - _DepthBias: 0.00012 36 | - _EdgeThickness: 1 37 | - _Metallic: 0 38 | - _Smoothness: 1 39 | - _WireframeSmoothing: 0 40 | - _WireframeThickness: 0.7 41 | m_Colors: 42 | - _ATint: {r: 1, g: 1, b: 1, a: 1} 43 | - _Color: {r: 1, g: 1, b: 1, a: 1} 44 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 45 | - _WireframeColor: {r: 1, g: 1, b: 1, a: 1} 46 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SDUnityChan_AltMat/skin_mat 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 808581c271ba394489ed21736f306899 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 700bc05bc3431044193a348b6838b4a7 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04f73a2b09f11ef4ca887c338814f973 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Animations/SD_unitychan_motion_humanoid.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0702f03fac0faa4d983e423203b2fb4 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Animations/SD_unitychan_motion_humanoid.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Animations/SD_unitychan_motion_humanoid.fbx -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b1c87a3b91d3414ca85dca100de04ed 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cebe7ff9894836c4db0c2965ce04a1fd 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/angry@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6af7063efc0bc6468d4cd7f0b9fe0f9 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/confuse@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bc770c2b792a814b933a20020654d70 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/damaged@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7753af29ddf89c24997a3af890dd69b0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/default@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a69449929078cf14a99a34501fd4e5a0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/eye_close@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 433a706b1b1cac9488ddbd2d1083baf9 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_L@sd_generic.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_L@sd_generic 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_L 36 | path: Character1_Reference/center/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 3261241612 49 | attribute: 384548271 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 0 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 0 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_L 92 | path: Character1_Reference/center/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_L@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af80b011e2db14248815aa9b483264ca 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_R@sd_generic.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_R@sd_generic 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_R 36 | path: Character1_Reference/center/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 3261241612 49 | attribute: 3974398156 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 0 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 0 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_R 92 | path: Character1_Reference/center/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_R@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a4678d510ba7ab449c6a94d12ddb49e 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_a@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a38817086aca50e449be73167fd9fc0b 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_e@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64e8e919196070343b5b04e5b1a12292 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_i@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d0cd7872021e3f48b584e0c14a8069f 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_o@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 271ba0f0962ffe240ac223395ab3f8d5 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/mth_u@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1bf3957b66d1f940ae32181274e5d38 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/relux@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abca4b366869eeb4b9e8bc9a82031de8 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/sad@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac018e0743b1c0344ad0643151e416ac 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/scold@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb0ff5dd0d2591f4b8790ef033375a40 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/smile2@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cad8a141717a7354c99414a512a598a0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/smile@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f63e6c7ca833eac4e92df46a104911cf 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/strain@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 962012f756587bd45b49dec07bac580c 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Generic/surprise@sd_generic.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9553278f438c5344082f1692d1c162e8 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c57263c8486a4f4c804707428e0cfba 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/angry@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d022baae72960439ca9bc35168cde644 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/confuse@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fb84b7bbc6fe402a8a888ea10646789 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/damaged@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 052052524e8fd4e47b75db0131b4b118 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/default@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ba07efc7490d48959dfb3879f8be04a 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/eye_close@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c6ef5f43979d4ac396faf724a6a4dd0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_L@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_L@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_L 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 384548271 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_L 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_L@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ccfe86ed1121478bbeacb8e227ec19c 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_R@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_R@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_R 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 3974398156 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_R 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_R@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 508261753cbbd4493b10da3a43602a39 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_a@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_a@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_a 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 1395974618 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_a 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_a@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ac255bd0dd6047e9b2df5ac70b1c45d 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_e@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_e@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_e 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 1415128515 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_e 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_e@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7c86dc2bf7f54f6caa8076d5b450437 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_i@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_i@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_i 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 1575971304 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_i 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_i@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a13d16a8fe186444f9bd2b411d43351c 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_o@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_o@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_o 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 3029126365 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_o 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_o@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24f6fd9f7d6e14b429858f4d017e7195 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_u@sd_hmd.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: mth_u@sd_hmd 10 | serializedVersion: 6 11 | m_Legacy: 0 12 | m_Compressed: 0 13 | m_UseHighQualityCurve: 1 14 | m_RotationCurves: [] 15 | m_CompressedRotationCurves: [] 16 | m_EulerCurves: [] 17 | m_PositionCurves: [] 18 | m_ScaleCurves: [] 19 | m_FloatCurves: 20 | - curve: 21 | serializedVersion: 2 22 | m_Curve: 23 | - serializedVersion: 3 24 | time: 0 25 | value: 100 26 | inSlope: 0 27 | outSlope: 0 28 | tangentMode: 34 29 | weightedMode: 0 30 | inWeight: 0.33333334 31 | outWeight: 0.33333334 32 | m_PreInfinity: 2 33 | m_PostInfinity: 2 34 | m_RotationOrder: 4 35 | attribute: blendShape.face.MTH_u 36 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 37 | classID: 137 38 | script: {fileID: 0} 39 | m_PPtrCurves: [] 40 | m_SampleRate: 60 41 | m_WrapMode: 0 42 | m_Bounds: 43 | m_Center: {x: 0, y: 0, z: 0} 44 | m_Extent: {x: 0, y: 0, z: 0} 45 | m_ClipBindingConstant: 46 | genericBindings: 47 | - serializedVersion: 2 48 | path: 1128456281 49 | attribute: 1240348071 50 | script: {fileID: 0} 51 | typeID: 137 52 | customType: 20 53 | isPPtrCurve: 0 54 | pptrCurveMapping: [] 55 | m_AnimationClipSettings: 56 | serializedVersion: 2 57 | m_AdditiveReferencePoseClip: {fileID: 0} 58 | m_AdditiveReferencePoseTime: 0 59 | m_StartTime: 0 60 | m_StopTime: 0 61 | m_OrientationOffsetY: 0 62 | m_Level: 0 63 | m_CycleOffset: 0 64 | m_HasAdditiveReferencePose: 0 65 | m_LoopTime: 1 66 | m_LoopBlend: 0 67 | m_LoopBlendOrientation: 0 68 | m_LoopBlendPositionY: 0 69 | m_LoopBlendPositionXZ: 0 70 | m_KeepOriginalOrientation: 1 71 | m_KeepOriginalPositionY: 1 72 | m_KeepOriginalPositionXZ: 1 73 | m_HeightFromFeet: 0 74 | m_Mirror: 0 75 | m_EditorCurves: 76 | - curve: 77 | serializedVersion: 2 78 | m_Curve: 79 | - serializedVersion: 3 80 | time: 0 81 | value: 100 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 34 85 | weightedMode: 0 86 | inWeight: 0.33333334 87 | outWeight: 0.33333334 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | attribute: blendShape.face.MTH_u 92 | path: Character1_Reference/Character1_Hips/Character1_Spine/Character1_Spine1/Character1_Spine2/Character1_Neck/Character1_Head/_face 93 | classID: 137 94 | script: {fileID: 0} 95 | m_EulerEditorCurves: [] 96 | m_HasGenericRootTransform: 0 97 | m_HasMotionFloatCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/mth_u@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73be46601457e417584986e26fcaf567 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/relux@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c7ae9e4974854c81a425f98211bc25f 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/sad@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccf2553d159754da6b08936ec9999869 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/scold@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4b9611887a9f43c0ae3fc39870a7b5f 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/smile2@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9388e606933645cdbb57d61ab9cc186 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/smile@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cec97cfaae8c7454f9e3fb92ebf3b337 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/strain@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e996ba46f070c4ec9b73996777f95a10 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/Humanoid/surprise@sd_hmd.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b7c62bb2e05c47c5afd5486e2eceaf6 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/FaceAnimations/_faceOnly.mask.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d4e0e0d2eda147be851af6d686de166 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce5dbc604fdbae54ca9eff44dfbc9992 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d082e0bb5ac6fdb4a81a858b4f437832 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/def_mat.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: def_mat 11 | m_Shader: {fileID: 4800000, guid: 96d05de60c5f7474491f9f94568cf623, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _SpecularPower: 20 50 | m_Colors: 51 | - _Color: {r: 1, g: 1, b: 1, a: 1} 52 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 53 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/def_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33617e2203e55fa46801e063486b59f3 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/hair_mat.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: hair_mat 11 | m_Shader: {fileID: 4800000, guid: 235ca6f7bbc0ead4990f386a7ec24292, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _SpecularPower: 20 50 | m_Colors: 51 | - _Color: {r: 1, g: 1, b: 1, a: 1} 52 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 53 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/hair_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787cbe8c6e6ebf74e856c2ccb3eb1923 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/mouth_mat.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: mouth_mat 11 | m_Shader: {fileID: 4800000, guid: b35a2abbdd5b15d4ca40103088758eac, type: 3} 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 | - _FalloffSampler: 23 | m_Texture: {fileID: 2800000, guid: 940d3c904d88ec743a6d6e7ac7e7937e, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _RimLightSampler: 31 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | m_Floats: 35 | - _DepthBias: 0.00012 36 | - _EdgeThickness: 1 37 | m_Colors: 38 | - _Color: {r: 1, g: 1, b: 1, a: 1} 39 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 40 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/mouth_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09608bb10cbd4714a94445805ab7a652 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/nol_mat.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: nol_mat 11 | m_Shader: {fileID: 4800000, guid: 00262b50562beb14cbab9b52bced4f9f, type: 3} 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 | - _EnvMapSampler: 23 | m_Texture: {fileID: 2800000, guid: 44d020db90fd5ae4ea345969090687a3, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _FalloffSampler: 27 | m_Texture: {fileID: 2800000, guid: 39083b0062b00af459504f23a97162b4, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _NormalMapSampler: 35 | m_Texture: {fileID: 2800000, guid: 54a57c962fa43e14e9c13ad64e22b5ee, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _RimLightSampler: 39 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _SpecularReflectionSampler: 43 | m_Texture: {fileID: 2800000, guid: cff7600e2c49af944b50d9621671371e, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | m_Floats: 47 | - _DepthBias: 0.00012 48 | - _EdgeThickness: 1 49 | - _SpecularPower: 20 50 | m_Colors: 51 | - _Color: {r: 1, g: 1, b: 1, a: 1} 52 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 53 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/nol_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a172534e4207dec438dea0e660e996a7 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/skin_mat.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: skin_mat 11 | m_Shader: {fileID: 4800000, guid: b35a2abbdd5b15d4ca40103088758eac, type: 3} 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 | - _FalloffSampler: 23 | m_Texture: {fileID: 2800000, guid: 940d3c904d88ec743a6d6e7ac7e7937e, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 0f83c88893812674fb27a67cc3d624d9, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _RimLightSampler: 31 | m_Texture: {fileID: 2800000, guid: 8073bf8eba43a72439ddf804cec5b97a, type: 3} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | m_Floats: 35 | - _DepthBias: 0.00012 36 | - _EdgeThickness: 1 37 | m_Colors: 38 | - _Color: {r: 1, g: 1, b: 1, a: 1} 39 | - _ShadowColor: {r: 0.8, g: 0.8, b: 1, a: 1} 40 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Materials/skin_mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b87a4da61900d68429a41bed3ea42d16 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/SD_unitychan_humanoid.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/SD_unitychan_humanoid.fbx -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48697dc906ceeab439135622b7d7e944 3 | folderAsset: yes 4 | timeCreated: 1454041765 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/ENV2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/ENV2.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/ENV2.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44d020db90fd5ae4ea345969090687a3 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_CLOTH1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_CLOTH1.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_CLOTH1.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39083b0062b00af459504f23a97162b4 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_RIM1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_RIM1.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_RIM1.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8073bf8eba43a72439ddf804cec5b97a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_SKIN1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_SKIN1.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/FO_SKIN1.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 940d3c904d88ec743a6d6e7ac7e7937e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_all2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_all2.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_all2.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f83c88893812674fb27a67cc3d624d9 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_nomal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_nomal.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_nomal.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54a57c962fa43e14e9c13ad64e22b5ee 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_spec.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_spec.tga -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/SD_unitychan/Models/Textures/utc_spec.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cff7600e2c49af944b50d9621671371e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | allowsAlphaSplitting: 0 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 0 47 | textureType: -1 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | assetBundleVariant: 55 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 394fc9bbe7f0a4dc3bd96547786d7f1d 3 | folderAsset: yes 4 | timeCreated: 1487141854 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/AutoBlink.cs: -------------------------------------------------------------------------------- 1 | // 2 | //AutoBlink.cs 3 | //オート目パチスクリプト 4 | //2014/06/23 N.Kobayashi 5 | // 6 | using UnityEngine; 7 | using System.Collections; 8 | 9 | namespace UnityChan 10 | { 11 | public class AutoBlink : MonoBehaviour 12 | { 13 | 14 | public bool isActive = true; //オート目パチ有効 15 | public SkinnedMeshRenderer ref_SMR_EYE_DEF; //EYE_DEFへの参照 16 | public SkinnedMeshRenderer ref_SMR_EL_DEF; //EL_DEFへの参照 17 | public float ratio_Close = 85.0f; //閉じ目ブレンドシェイプ比率 18 | public float ratio_HalfClose = 20.0f; //半閉じ目ブレンドシェイプ比率 19 | [HideInInspector] 20 | public float 21 | ratio_Open = 0.0f; 22 | private bool timerStarted = false; //タイマースタート管理用 23 | private bool isBlink = false; //目パチ管理用 24 | 25 | public float timeBlink = 0.4f; //目パチの時間 26 | private float timeRemining = 0.0f; //タイマー残り時間 27 | 28 | public float threshold = 0.3f; // ランダム判定の閾値 29 | public float interval = 3.0f; // ランダム判定のインターバル 30 | 31 | 32 | 33 | enum Status 34 | { 35 | Close, 36 | HalfClose, 37 | Open //目パチの状態 38 | } 39 | 40 | 41 | private Status eyeStatus; //現在の目パチステータス 42 | 43 | void Awake () 44 | { 45 | //ref_SMR_EYE_DEF = GameObject.Find("EYE_DEF").GetComponent(); 46 | //ref_SMR_EL_DEF = GameObject.Find("EL_DEF").GetComponent(); 47 | } 48 | 49 | 50 | 51 | // Use this for initialization 52 | void Start () 53 | { 54 | ResetTimer (); 55 | // ランダム判定用関数をスタートする 56 | StartCoroutine ("RandomChange"); 57 | } 58 | 59 | //タイマーリセット 60 | void ResetTimer () 61 | { 62 | timeRemining = timeBlink; 63 | timerStarted = false; 64 | } 65 | 66 | // Update is called once per frame 67 | void Update () 68 | { 69 | if (!timerStarted) { 70 | eyeStatus = Status.Close; 71 | timerStarted = true; 72 | } 73 | if (timerStarted) { 74 | timeRemining -= Time.deltaTime; 75 | if (timeRemining <= 0.0f) { 76 | eyeStatus = Status.Open; 77 | ResetTimer (); 78 | } else if (timeRemining <= timeBlink * 0.3f) { 79 | eyeStatus = Status.HalfClose; 80 | } 81 | } 82 | } 83 | 84 | void LateUpdate () 85 | { 86 | if (isActive) { 87 | if (isBlink) { 88 | switch (eyeStatus) { 89 | case Status.Close: 90 | SetCloseEyes (); 91 | break; 92 | case Status.HalfClose: 93 | SetHalfCloseEyes (); 94 | break; 95 | case Status.Open: 96 | SetOpenEyes (); 97 | isBlink = false; 98 | break; 99 | } 100 | //Debug.Log(eyeStatus); 101 | } 102 | } 103 | } 104 | 105 | void SetCloseEyes () 106 | { 107 | ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_Close); 108 | ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_Close); 109 | } 110 | 111 | void SetHalfCloseEyes () 112 | { 113 | ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_HalfClose); 114 | ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_HalfClose); 115 | } 116 | 117 | void SetOpenEyes () 118 | { 119 | ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_Open); 120 | ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_Open); 121 | } 122 | 123 | // ランダム判定用関数 124 | IEnumerator RandomChange () 125 | { 126 | // 無限ループ開始 127 | while (true) { 128 | //ランダム判定用シード発生 129 | float _seed = Random.Range (0.0f, 1.0f); 130 | if (!isBlink) { 131 | if (_seed > threshold) { 132 | isBlink = true; 133 | } 134 | } 135 | // 次の判定までインターバルを置く 136 | yield return new WaitForSeconds (interval); 137 | } 138 | } 139 | } 140 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/AutoBlink.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a6149a22cf8a47a192a60b00b3becb3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/AutoBlinkforSD.cs: -------------------------------------------------------------------------------- 1 | // 2 | //AutoBlinkforSD.cs 3 | //SDユニティちゃん用オート目パチスクリプト 4 | //2014/12/10 N.Kobayashi 5 | // 6 | using UnityEngine; 7 | using System.Collections; 8 | using System.Security.Policy; 9 | 10 | namespace UnityChan 11 | { 12 | public class AutoBlinkforSD : MonoBehaviour 13 | { 14 | 15 | public bool isActive = true; //オート目パチ有効 16 | public SkinnedMeshRenderer ref_face; //_faceへの参照 17 | public float ratio_Close = 85.0f; //閉じ目ブレンドシェイプ比率 18 | public float ratio_HalfClose = 20.0f; //半閉じ目ブレンドシェイプ比率 19 | public int index_EYE_blk = 0; //目パチ用モーフのindex 20 | public int index_EYE_sml = 1; //目パチさせたくないモーフのindex 21 | public int index_EYE_dmg = 15; //目パチさせたくないモーフのindex 22 | 23 | 24 | [HideInInspector] 25 | public float 26 | ratio_Open = 0.0f; 27 | private bool timerStarted = false; //タイマースタート管理用 28 | private bool isBlink = false; //目パチ管理用 29 | 30 | public float timeBlink = 0.4f; //目パチの時間 31 | private float timeRemining = 0.0f; //タイマー残り時間 32 | 33 | public float threshold = 0.3f; // ランダム判定の閾値 34 | public float interval = 3.0f; // ランダム判定のインターバル 35 | 36 | 37 | 38 | enum Status 39 | { 40 | Close, 41 | HalfClose, 42 | Open //目パチの状態 43 | } 44 | 45 | 46 | private Status eyeStatus; //現在の目パチステータス 47 | 48 | void Awake () 49 | { 50 | //ref_SMR_EYE_DEF = GameObject.Find("EYE_DEF").GetComponent(); 51 | //ref_SMR_EL_DEF = GameObject.Find("EL_DEF").GetComponent(); 52 | } 53 | 54 | 55 | 56 | // Use this for initialization 57 | void Start () 58 | { 59 | ResetTimer (); 60 | // ランダム判定用関数をスタートする 61 | StartCoroutine ("RandomChange"); 62 | } 63 | 64 | //タイマーリセット 65 | void ResetTimer () 66 | { 67 | timeRemining = timeBlink; 68 | timerStarted = false; 69 | } 70 | 71 | // Update is called once per frame 72 | void Update () 73 | { 74 | if (!timerStarted) { 75 | eyeStatus = Status.Close; 76 | timerStarted = true; 77 | } 78 | if (timerStarted) { 79 | timeRemining -= Time.deltaTime; 80 | if (timeRemining <= 0.0f) { 81 | eyeStatus = Status.Open; 82 | ResetTimer (); 83 | } else if (timeRemining <= timeBlink * 0.3f) { 84 | eyeStatus = Status.HalfClose; 85 | } 86 | } 87 | } 88 | 89 | void LateUpdate () 90 | { 91 | if (isActive) { 92 | if (isBlink) { 93 | switch (eyeStatus) { 94 | case Status.Close: 95 | SetCloseEyes (); 96 | break; 97 | case Status.HalfClose: 98 | SetHalfCloseEyes (); 99 | break; 100 | case Status.Open: 101 | SetOpenEyes (); 102 | isBlink = false; 103 | break; 104 | } 105 | //Debug.Log(eyeStatus); 106 | } 107 | } 108 | } 109 | 110 | void SetCloseEyes () 111 | { 112 | ref_face.SetBlendShapeWeight (index_EYE_blk, ratio_Close); 113 | } 114 | 115 | void SetHalfCloseEyes () 116 | { 117 | ref_face.SetBlendShapeWeight (index_EYE_blk, ratio_HalfClose); 118 | } 119 | 120 | void SetOpenEyes () 121 | { 122 | ref_face.SetBlendShapeWeight (index_EYE_blk, ratio_Open); 123 | } 124 | 125 | // ランダム判定用関数 126 | IEnumerator RandomChange () 127 | { 128 | // 無限ループ開始 129 | while (true) { 130 | //ランダム判定用シード発生 131 | float _seed = Random.Range (0.0f, 1.0f); 132 | if (!isBlink) { 133 | if (_seed > threshold) { 134 | //目パチさせたくないモーフの時だけ飛ばす. 135 | if(ref_face.GetBlendShapeWeight(index_EYE_sml)==0.0f && ref_face.GetBlendShapeWeight(index_EYE_dmg)==0.0f){ 136 | isBlink = true; 137 | } 138 | } 139 | } 140 | // 次の判定までインターバルを置く 141 | yield return new WaitForSeconds (interval); 142 | } 143 | } 144 | } 145 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/AutoBlinkforSD.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b450e0eeaa67f4e4f83448b61a571d3b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/CameraController.cs: -------------------------------------------------------------------------------- 1 | //CameraController.cs for UnityChan 2 | //Original Script is here: 3 | //TAK-EMI / CameraController.cs 4 | //https://gist.github.com/TAK-EMI/d67a13b6f73bed32075d 5 | //https://twitter.com/TAK_EMI 6 | // 7 | //Revised by N.Kobayashi 2014/5/15 8 | //Change : To prevent rotation flips on XY plane, use Quaternion in cameraRotate() 9 | //Change : Add the instrustion window 10 | //Change : Add the operation for Mac 11 | // 12 | 13 | 14 | 15 | 16 | using UnityEngine; 17 | using System.Collections; 18 | 19 | namespace UnityChan 20 | { 21 | enum MouseButtonDown 22 | { 23 | MBD_LEFT = 0, 24 | MBD_RIGHT, 25 | MBD_MIDDLE, 26 | }; 27 | 28 | public class CameraController : MonoBehaviour 29 | { 30 | [SerializeField] 31 | private Vector3 focus = Vector3.zero; 32 | [SerializeField] 33 | private GameObject focusObj = null; 34 | 35 | public bool showInstWindow = true; 36 | 37 | private Vector3 oldPos; 38 | 39 | void setupFocusObject(string name) 40 | { 41 | GameObject obj = this.focusObj = new GameObject(name); 42 | obj.transform.position = this.focus; 43 | obj.transform.LookAt(this.transform.position); 44 | 45 | return; 46 | } 47 | 48 | void Start () 49 | { 50 | if (this.focusObj == null) 51 | this.setupFocusObject("CameraFocusObject"); 52 | 53 | Transform trans = this.transform; 54 | transform.parent = this.focusObj.transform; 55 | 56 | trans.LookAt(this.focus); 57 | 58 | return; 59 | } 60 | 61 | void Update () 62 | { 63 | this.mouseEvent(); 64 | 65 | return; 66 | } 67 | 68 | //Show Instrustion Window 69 | void OnGUI() 70 | { 71 | if(showInstWindow){ 72 | GUI.Box(new Rect(Screen.width -210, Screen.height - 100, 200, 90), "Camera Operations"); 73 | GUI.Label(new Rect(Screen.width -200, Screen.height - 80, 200, 30),"RMB / Alt+LMB: Tumble"); 74 | GUI.Label(new Rect(Screen.width -200, Screen.height - 60, 200, 30),"MMB / Alt+Cmd+LMB: Track"); 75 | GUI.Label(new Rect(Screen.width -200, Screen.height - 40, 200, 30),"Wheel / 2 Fingers Swipe: Dolly"); 76 | } 77 | 78 | } 79 | 80 | void mouseEvent() 81 | { 82 | float delta = Input.GetAxis("Mouse ScrollWheel"); 83 | if (delta != 0.0f) 84 | this.mouseWheelEvent(delta); 85 | 86 | if (Input.GetMouseButtonDown((int)MouseButtonDown.MBD_LEFT) || 87 | Input.GetMouseButtonDown((int)MouseButtonDown.MBD_MIDDLE) || 88 | Input.GetMouseButtonDown((int)MouseButtonDown.MBD_RIGHT)) 89 | this.oldPos = Input.mousePosition; 90 | 91 | this.mouseDragEvent(Input.mousePosition); 92 | 93 | return; 94 | } 95 | 96 | void mouseDragEvent(Vector3 mousePos) 97 | { 98 | Vector3 diff = mousePos - oldPos; 99 | 100 | if(Input.GetMouseButton((int)MouseButtonDown.MBD_LEFT)) 101 | { 102 | //Operation for Mac : "Left Alt + Left Command + LMB Drag" is Track 103 | if(Input.GetKey(KeyCode.LeftAlt) && Input.GetKey(KeyCode.LeftCommand)) 104 | { 105 | if (diff.magnitude > Vector3.kEpsilon) 106 | this.cameraTranslate(-diff / 100.0f); 107 | } 108 | //Operation for Mac : "Left Alt + LMB Drag" is Tumble 109 | else if (Input.GetKey(KeyCode.LeftAlt)) 110 | { 111 | if (diff.magnitude > Vector3.kEpsilon) 112 | this.cameraRotate(new Vector3(diff.y, diff.x, 0.0f)); 113 | } 114 | //Only "LMB Drag" is no action. 115 | } 116 | //Track 117 | else if (Input.GetMouseButton((int)MouseButtonDown.MBD_MIDDLE)) 118 | { 119 | if (diff.magnitude > Vector3.kEpsilon) 120 | this.cameraTranslate(-diff / 100.0f); 121 | } 122 | //Tumble 123 | else if (Input.GetMouseButton((int)MouseButtonDown.MBD_RIGHT)) 124 | { 125 | if (diff.magnitude > Vector3.kEpsilon) 126 | this.cameraRotate(new Vector3(diff.y, diff.x, 0.0f)); 127 | } 128 | 129 | this.oldPos = mousePos; 130 | 131 | return; 132 | } 133 | 134 | //Dolly 135 | public void mouseWheelEvent(float delta) 136 | { 137 | Vector3 focusToPosition = this.transform.position - this.focus; 138 | 139 | Vector3 post = focusToPosition * (1.0f + delta); 140 | 141 | if (post.magnitude > 0.01) 142 | this.transform.position = this.focus + post; 143 | 144 | return; 145 | } 146 | 147 | void cameraTranslate(Vector3 vec) 148 | { 149 | Transform focusTrans = this.focusObj.transform; 150 | 151 | vec.x *= -1; 152 | 153 | focusTrans.Translate(Vector3.right * vec.x); 154 | focusTrans.Translate(Vector3.up * vec.y); 155 | 156 | this.focus = focusTrans.position; 157 | 158 | return; 159 | } 160 | 161 | public void cameraRotate(Vector3 eulerAngle) 162 | { 163 | //Use Quaternion to prevent rotation flips on XY plane 164 | Quaternion q = Quaternion.identity; 165 | 166 | Transform focusTrans = this.focusObj.transform; 167 | focusTrans.localEulerAngles = focusTrans.localEulerAngles + eulerAngle; 168 | 169 | //Change this.transform.LookAt(this.focus) to q.SetLookRotation(this.focus) 170 | q.SetLookRotation (this.focus) ; 171 | 172 | return; 173 | } 174 | } 175 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/CameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd026706e81db0440add962177d87b23 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/FaceUpdate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace UnityChan 5 | { 6 | public class FaceUpdate : MonoBehaviour 7 | { 8 | public AnimationClip[] animations; 9 | Animator anim; 10 | public float delayWeight; 11 | public bool isKeepFace = false; 12 | public bool isGUI = true; 13 | 14 | void Start () 15 | { 16 | anim = GetComponent (); 17 | } 18 | 19 | void OnGUI () 20 | { 21 | if (isGUI) 22 | { 23 | GUILayout.Box("Face Update", GUILayout.Width(170), GUILayout.Height(25 * (animations.Length + 2))); 24 | Rect screenRect = new Rect(10, 25, 150, 25 * (animations.Length + 1)); 25 | GUILayout.BeginArea(screenRect); 26 | foreach (var animation in animations) 27 | { 28 | if (GUILayout.RepeatButton(animation.name)) 29 | { 30 | anim.CrossFade(animation.name, 0); 31 | } 32 | } 33 | isKeepFace = GUILayout.Toggle(isKeepFace, " Keep Face"); 34 | GUILayout.EndArea(); 35 | } 36 | } 37 | 38 | float current = 0; 39 | 40 | void Update () 41 | { 42 | 43 | if (Input.GetMouseButton (0)) { 44 | current = 1; 45 | } else if (!isKeepFace) { 46 | current = Mathf.Lerp (current, 0, delayWeight); 47 | } 48 | anim.SetLayerWeight (1, current); 49 | } 50 | 51 | 52 | //アニメーションEvents側につける表情切り替え用イベントコール 53 | public void OnCallChangeFace (string str) 54 | { 55 | int ichecked = 0; 56 | foreach (var animation in animations) { 57 | if (str == animation.name) { 58 | ChangeFace (str); 59 | break; 60 | } else if (ichecked <= animations.Length) { 61 | ichecked++; 62 | } else { 63 | //str指定が間違っている時にはデフォルトで 64 | str = "default@unitychan"; 65 | ChangeFace (str); 66 | } 67 | } 68 | } 69 | 70 | void ChangeFace (string str) 71 | { 72 | isKeepFace = true; 73 | current = 1; 74 | anim.CrossFade (str, 0); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/FaceUpdate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e658bfc1e524494b9e54a1c92d8c1e0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IKCtrlRightHand.cs: -------------------------------------------------------------------------------- 1 | // 2 | //IKCtrlRightHand.cs 3 | // 4 | //Sample script for IK Control of Unity-Chan's right hand. 5 | // 6 | //2014/06/20 N.Kobayashi 7 | // 8 | using UnityEngine; 9 | using System.Collections; 10 | 11 | namespace UnityChan 12 | { 13 | [RequireComponent(typeof(Animator))] 14 | public class IKCtrlRightHand : MonoBehaviour 15 | { 16 | 17 | private Animator anim; 18 | public Transform targetObj = null; 19 | public bool isIkActive = false; 20 | public float mixWeight = 1.0f; 21 | 22 | void Awake () 23 | { 24 | anim = GetComponent (); 25 | } 26 | 27 | void Update () 28 | { 29 | //Kobayashi 30 | if (mixWeight >= 1.0f) 31 | mixWeight = 1.0f; 32 | else if (mixWeight <= 0.0f) 33 | mixWeight = 0.0f; 34 | } 35 | 36 | void OnAnimatorIK (int layerIndex) 37 | { 38 | if (isIkActive) { 39 | anim.SetIKPositionWeight (AvatarIKGoal.RightHand, mixWeight); 40 | anim.SetIKRotationWeight (AvatarIKGoal.RightHand, mixWeight); 41 | anim.SetIKPosition (AvatarIKGoal.RightHand, targetObj.position); 42 | anim.SetIKRotation (AvatarIKGoal.RightHand, targetObj.rotation); 43 | } 44 | } 45 | 46 | void OnGUI () 47 | { 48 | Rect rect1 = new Rect (10, Screen.height - 20, 400, 30); 49 | isIkActive = GUI.Toggle (rect1, isIkActive, "IK Active"); 50 | } 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IKCtrlRightHand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16931e3bbabb00f478bbbe4759af8343 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IKLookAt.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mecanim.IkLookAt 3 | // 使用時には、AnimatorのBase LayerのIK PassをONにすること. 4 | // 5 | using UnityEngine; 6 | using System.Collections; 7 | 8 | 9 | namespace UnityChan 10 | { 11 | 12 | // [RequireComponent(typeof(Animator))] 13 | 14 | public class IKLookAt : MonoBehaviour { 15 | 16 | private Animator avator; 17 | private MeshRenderer target = null; 18 | 19 | public bool ikActive = false; 20 | public Transform lookAtObj = null; 21 | 22 | public float lookAtWeight = 1.0f; 23 | public float bodyWeight = 0.3f; 24 | public float headWeight = 0.8f; 25 | public float eyesWeight = 1.0f; 26 | public float clampWeight = 0.5f; 27 | public bool isGUI = true; 28 | 29 | 30 | 31 | 32 | 33 | // Use this for initialization 34 | void Start () { 35 | avator = GetComponent(); 36 | if (lookAtObj != null) 37 | { 38 | target = lookAtObj.GetComponentInParent(); 39 | target.enabled = false; 40 | } 41 | 42 | } 43 | 44 | void OnGUI() 45 | { 46 | 47 | if (isGUI) 48 | { 49 | Rect rect1 = new Rect(Screen.width - 120, Screen.height - 40, 100, 30); 50 | //GUILayout.Label("Activate Look at IK"); 51 | ikActive = GUI.Toggle(rect1, ikActive, "Look at Target"); 52 | } 53 | } 54 | 55 | 56 | void OnAnimatorIK(int layorIndex) 57 | { 58 | if(avator) 59 | { 60 | if(ikActive) 61 | { 62 | avator.SetLookAtWeight(lookAtWeight,bodyWeight,headWeight,eyesWeight,clampWeight); 63 | if (lookAtObj != null) 64 | { 65 | target.enabled = true; 66 | avator.SetLookAtPosition(lookAtObj.position); 67 | } 68 | else 69 | { 70 | avator.SetLookAtWeight(0.0f); 71 | } 72 | } 73 | else 74 | { 75 | avator.SetLookAtWeight(0.0f); 76 | } 77 | } 78 | } 79 | 80 | void Update () 81 | { 82 | if(avator) 83 | { 84 | if(!ikActive) 85 | { 86 | if (lookAtObj != null) 87 | { 88 | target.enabled = false; 89 | //Targetを消した位置に再び出したい場合には、下の行をコメントアウトする. 90 | //lookAtObj.position = avator.bodyPosition + avator.bodyRotation * new Vector3(0,0.5f,1); 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IKLookAt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75453f0413251fd42811d1b1eb4728c1 3 | timeCreated: 1452361588 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IdleChanger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace UnityChan 5 | { 6 | // 7 | // ↑↓キーでループアニメーションを切り替えるスクリプト(ランダム切り替え付き)Ver.3 8 | // 2014/04/03 N.Kobayashi 9 | // 2015/03/11 Revised for Unity5 (only) 10 | // 11 | 12 | // Require these components when using this script 13 | [RequireComponent(typeof(Animator))] 14 | 15 | 16 | 17 | public class IdleChanger : MonoBehaviour 18 | { 19 | 20 | private Animator anim; // Animatorへの参照 21 | private AnimatorStateInfo currentState; // 現在のステート状態を保存する参照 22 | private AnimatorStateInfo previousState; // ひとつ前のステート状態を保存する参照 23 | public bool _random = false; // ランダム判定スタートスイッチ 24 | public float _threshold = 0.5f; // ランダム判定の閾値 25 | public float _interval = 10f; // ランダム判定のインターバル 26 | //private float _seed = 0.0f; // ランダム判定用シード 27 | public bool isGUI = true; 28 | 29 | 30 | 31 | // Use this for initialization 32 | void Start () 33 | { 34 | // 各参照の初期化 35 | anim = GetComponent (); 36 | currentState = anim.GetCurrentAnimatorStateInfo (0); 37 | previousState = currentState; 38 | // ランダム判定用関数をスタートする 39 | StartCoroutine ("RandomChange"); 40 | } 41 | 42 | // Update is called once per frame 43 | void Update () 44 | { 45 | // ↑キー/スペースが押されたら、ステートを次に送る処理 46 | if (Input.GetKeyDown ("up") || Input.GetButton ("Jump")) { 47 | // ブーリアンNextをtrueにする 48 | anim.SetBool ("Next", true); 49 | } 50 | 51 | // ↓キーが押されたら、ステートを前に戻す処理 52 | if (Input.GetKeyDown ("down")) { 53 | // ブーリアンBackをtrueにする 54 | anim.SetBool ("Back", true); 55 | } 56 | 57 | // "Next"フラグがtrueの時の処理 58 | if (anim.GetBool ("Next")) { 59 | // 現在のステートをチェックし、ステート名が違っていたらブーリアンをfalseに戻す 60 | currentState = anim.GetCurrentAnimatorStateInfo (0); 61 | if (previousState.fullPathHash != currentState.fullPathHash) { 62 | anim.SetBool ("Next", false); 63 | previousState = currentState; 64 | } 65 | } 66 | 67 | // "Back"フラグがtrueの時の処理 68 | if (anim.GetBool ("Back")) { 69 | // 現在のステートをチェックし、ステート名が違っていたらブーリアンをfalseに戻す 70 | currentState = anim.GetCurrentAnimatorStateInfo (0); 71 | if (previousState.fullPathHash != currentState.fullPathHash) { 72 | anim.SetBool ("Back", false); 73 | previousState = currentState; 74 | } 75 | } 76 | } 77 | 78 | void OnGUI () 79 | { 80 | if (isGUI) 81 | { 82 | GUI.Box(new Rect(Screen.width - 110, 10, 100, 90), "Change Motion"); 83 | if (GUI.Button(new Rect(Screen.width - 100, 40, 80, 20), "Next")) 84 | anim.SetBool("Next", true); 85 | if (GUI.Button(new Rect(Screen.width - 100, 70, 80, 20), "Back")) 86 | anim.SetBool("Back", true); 87 | } 88 | } 89 | 90 | 91 | // ランダム判定用関数 92 | IEnumerator RandomChange () 93 | { 94 | // 無限ループ開始 95 | while (true) { 96 | //ランダム判定スイッチオンの場合 97 | if (_random) { 98 | // ランダムシードを取り出し、その大きさによってフラグ設定をする 99 | float _seed = Random.Range (0.0f, 1.0f); 100 | if (_seed < _threshold) { 101 | anim.SetBool ("Back", true); 102 | } else if (_seed >= _threshold) { 103 | anim.SetBool ("Next", true); 104 | } 105 | } 106 | // 次の判定までインターバルを置く 107 | yield return new WaitForSeconds (_interval); 108 | } 109 | 110 | } 111 | 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/IdleChanger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 058a2736f2afd564eae55007a87eed87 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/RandomWind.cs: -------------------------------------------------------------------------------- 1 | // 2 | //RandomWind.cs for unity-chan! 3 | // 4 | //Original Script is here: 5 | //ricopin / RandomWind.cs 6 | //Rocket Jump : http://rocketjump.skr.jp/unity3d/109/ 7 | //https://twitter.com/ricopin416 8 | // 9 | //修正2014/12/20 10 | //風の方向変化/重力影響を追加. 11 | // 12 | 13 | using UnityEngine; 14 | using System.Collections; 15 | 16 | namespace UnityChan 17 | { 18 | public class RandomWind : MonoBehaviour 19 | { 20 | private SpringBone[] springBones; 21 | public bool isWindActive = false; 22 | 23 | private bool isMinus = false; //風方向反転用. 24 | public float threshold = 0.5f; // ランダム判定の閾値. 25 | public float interval = 5.0f; // ランダム判定のインターバル. 26 | public float windPower = 1.0f; //風の強さ. 27 | public float gravity = 0.98f; //重力の強さ. 28 | public bool isGUI = true; 29 | 30 | 31 | // Use this for initialization 32 | void Start () 33 | { 34 | springBones = GetComponent ().springBones; 35 | StartCoroutine ("RandomChange"); 36 | } 37 | 38 | 39 | 40 | 41 | 42 | // Update is called once per frame 43 | void Update () 44 | { 45 | 46 | Vector3 force = Vector3.zero; 47 | if (isWindActive) { 48 | if(isMinus){ 49 | force = new Vector3 (Mathf.PerlinNoise (Time.time, 0.0f) * windPower * -0.001f , gravity * -0.001f , 0); 50 | }else{ 51 | force = new Vector3 (Mathf.PerlinNoise (Time.time, 0.0f) * windPower * 0.001f, gravity * -0.001f, 0); 52 | } 53 | 54 | for (int i = 0; i < springBones.Length; i++) { 55 | springBones [i].springForce = force; 56 | } 57 | 58 | } 59 | } 60 | 61 | void OnGUI () 62 | { 63 | if (isGUI) 64 | { 65 | Rect rect1 = new Rect(10, Screen.height - 40, 400, 30); 66 | isWindActive = GUI.Toggle(rect1, isWindActive, "Random Wind"); 67 | } 68 | } 69 | 70 | // ランダム判定用関数. 71 | IEnumerator RandomChange () 72 | { 73 | // 無限ループ開始. 74 | while (true) { 75 | //ランダム判定用シード発生. 76 | float _seed = Random.Range (0.0f, 1.0f); 77 | 78 | if (_seed > threshold) { 79 | //_seedがthreshold以上の時、符号を反転する. 80 | isMinus = true; 81 | }else{ 82 | isMinus = false; 83 | } 84 | 85 | // 次の判定までインターバルを置く. 86 | yield return new WaitForSeconds (interval); 87 | } 88 | } 89 | 90 | 91 | } 92 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/RandomWind.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a38e39ada51aaba4db6d352ce218849e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringBone.cs: -------------------------------------------------------------------------------- 1 | // 2 | //SpringBone.cs for unity-chan! 3 | // 4 | //Original Script is here: 5 | //ricopin / SpringBone.cs 6 | //Rocket Jump : http://rocketjump.skr.jp/unity3d/109/ 7 | //https://twitter.com/ricopin416 8 | // 9 | //Revised by N.Kobayashi 2014/06/20 10 | // 11 | using UnityEngine; 12 | using System.Collections; 13 | 14 | namespace UnityChan 15 | { 16 | public class SpringBone : MonoBehaviour 17 | { 18 | //次のボーン 19 | public Transform child; 20 | 21 | //ボーンの向き 22 | public Vector3 boneAxis = new Vector3 (-1.0f, 0.0f, 0.0f); 23 | public float radius = 0.05f; 24 | 25 | //各SpringBoneに設定されているstiffnessForceとdragForceを使用するか? 26 | public bool isUseEachBoneForceSettings = false; 27 | 28 | //バネが戻る力 29 | public float stiffnessForce = 0.01f; 30 | 31 | //力の減衰力 32 | public float dragForce = 0.4f; 33 | public Vector3 springForce = new Vector3 (0.0f, -0.0001f, 0.0f); 34 | public SpringCollider[] colliders; 35 | public bool debug = true; 36 | //Kobayashi:Thredshold Starting to activate activeRatio 37 | public float threshold = 0.01f; 38 | private float springLength; 39 | private Quaternion localRotation; 40 | private Transform trs; 41 | private Vector3 currTipPos; 42 | private Vector3 prevTipPos; 43 | //Kobayashi 44 | private Transform org; 45 | //Kobayashi:Reference for "SpringManager" component with unitychan 46 | private SpringManager managerRef; 47 | 48 | private void Awake () 49 | { 50 | trs = transform; 51 | localRotation = transform.localRotation; 52 | //Kobayashi:Reference for "SpringManager" component with unitychan 53 | // GameObject.Find("unitychan_dynamic").GetComponent(); 54 | managerRef = GetParentSpringManager (transform); 55 | } 56 | 57 | private SpringManager GetParentSpringManager (Transform t) 58 | { 59 | var springManager = t.GetComponent (); 60 | 61 | if (springManager != null) 62 | return springManager; 63 | 64 | if (t.parent != null) { 65 | return GetParentSpringManager (t.parent); 66 | } 67 | 68 | return null; 69 | } 70 | 71 | private void Start () 72 | { 73 | springLength = Vector3.Distance (trs.position, child.position); 74 | currTipPos = child.position; 75 | prevTipPos = child.position; 76 | } 77 | 78 | public void UpdateSpring () 79 | { 80 | //Kobayashi 81 | org = trs; 82 | //回転をリセット 83 | trs.localRotation = Quaternion.identity * localRotation; 84 | 85 | float sqrDt = Time.deltaTime * Time.deltaTime; 86 | 87 | //stiffness 88 | Vector3 force = trs.rotation * (boneAxis * stiffnessForce) / sqrDt; 89 | 90 | //drag 91 | force += (prevTipPos - currTipPos) * dragForce / sqrDt; 92 | 93 | force += springForce / sqrDt; 94 | 95 | //前フレームと値が同じにならないように 96 | Vector3 temp = currTipPos; 97 | 98 | //verlet 99 | currTipPos = (currTipPos - prevTipPos) + currTipPos + (force * sqrDt); 100 | 101 | //長さを元に戻す 102 | currTipPos = ((currTipPos - trs.position).normalized * springLength) + trs.position; 103 | 104 | //衝突判定 105 | for (int i = 0; i < colliders.Length; i++) { 106 | if (Vector3.Distance (currTipPos, colliders [i].transform.position) <= (radius + colliders [i].radius)) { 107 | Vector3 normal = (currTipPos - colliders [i].transform.position).normalized; 108 | currTipPos = colliders [i].transform.position + (normal * (radius + colliders [i].radius)); 109 | currTipPos = ((currTipPos - trs.position).normalized * springLength) + trs.position; 110 | } 111 | 112 | 113 | } 114 | 115 | prevTipPos = temp; 116 | 117 | //回転を適用; 118 | Vector3 aimVector = trs.TransformDirection (boneAxis); 119 | Quaternion aimRotation = Quaternion.FromToRotation (aimVector, currTipPos - trs.position); 120 | //original 121 | //trs.rotation = aimRotation * trs.rotation; 122 | //Kobayahsi:Lerp with mixWeight 123 | Quaternion secondaryRotation = aimRotation * trs.rotation; 124 | trs.rotation = Quaternion.Lerp (org.rotation, secondaryRotation, managerRef.dynamicRatio); 125 | } 126 | 127 | private void OnDrawGizmos () 128 | { 129 | if (debug) { 130 | Gizmos.color = Color.yellow; 131 | Gizmos.DrawWireSphere (currTipPos, radius); 132 | } 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringBone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37b7c58dc2d739b4c90fe59f6875debf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringCollider.cs: -------------------------------------------------------------------------------- 1 | // 2 | //SpringCollider for unity-chan! 3 | // 4 | //Original Script is here: 5 | //ricopin / SpringCollider.cs 6 | //Rocket Jump : http://rocketjump.skr.jp/unity3d/109/ 7 | //https://twitter.com/ricopin416 8 | // 9 | using UnityEngine; 10 | using System.Collections; 11 | 12 | namespace UnityChan 13 | { 14 | public class SpringCollider : MonoBehaviour 15 | { 16 | //半径 17 | public float radius = 0.5f; 18 | 19 | private void OnDrawGizmosSelected () 20 | { 21 | Gizmos.color = Color.green; 22 | Gizmos.DrawWireSphere (transform.position, radius); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringCollider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcb73b690c023734fb267911061a15c6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringManager.cs: -------------------------------------------------------------------------------- 1 | // 2 | //SpingManager.cs for unity-chan! 3 | // 4 | //Original Script is here: 5 | //ricopin / SpingManager.cs 6 | //Rocket Jump : http://rocketjump.skr.jp/unity3d/109/ 7 | //https://twitter.com/ricopin416 8 | // 9 | //Revised by N.Kobayashi 2014/06/24 10 | // Y.Ebata 11 | // 12 | using UnityEngine; 13 | using System.Collections; 14 | 15 | namespace UnityChan 16 | { 17 | public class SpringManager : MonoBehaviour 18 | { 19 | //Kobayashi 20 | // DynamicRatio is paramater for activated level of dynamic animation 21 | public float dynamicRatio = 1.0f; 22 | 23 | //Ebata 24 | public float stiffnessForce; 25 | public AnimationCurve stiffnessCurve; 26 | public float dragForce; 27 | public AnimationCurve dragCurve; 28 | public SpringBone[] springBones; 29 | 30 | void Start () 31 | { 32 | UpdateParameters (); 33 | } 34 | 35 | #if UNITY_EDITOR 36 | void Update () 37 | { 38 | 39 | //Kobayashi 40 | if(dynamicRatio >= 1.0f) 41 | dynamicRatio = 1.0f; 42 | else if(dynamicRatio <= 0.0f) 43 | dynamicRatio = 0.0f; 44 | //Ebata 45 | UpdateParameters(); 46 | 47 | } 48 | #endif 49 | private void LateUpdate () 50 | { 51 | //Kobayashi 52 | if (dynamicRatio != 0.0f) { 53 | for (int i = 0; i < springBones.Length; i++) { 54 | if (dynamicRatio > springBones [i].threshold) { 55 | springBones [i].UpdateSpring (); 56 | } 57 | } 58 | } 59 | } 60 | 61 | private void UpdateParameters () 62 | { 63 | UpdateParameter ("stiffnessForce", stiffnessForce, stiffnessCurve); 64 | UpdateParameter ("dragForce", dragForce, dragCurve); 65 | } 66 | 67 | private void UpdateParameter (string fieldName, float baseValue, AnimationCurve curve) 68 | { 69 | #if UNITY_EDITOR 70 | var start = curve.keys [0].time; 71 | var end = curve.keys [curve.length - 1].time; 72 | //var step = (end - start) / (springBones.Length - 1); 73 | 74 | var prop = springBones [0].GetType ().GetField (fieldName, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public); 75 | 76 | for (int i = 0; i < springBones.Length; i++) { 77 | //Kobayashi 78 | if (!springBones [i].isUseEachBoneForceSettings) { 79 | var scale = curve.Evaluate (start + (end - start) * i / (springBones.Length - 1)); 80 | prop.SetValue (springBones [i], baseValue * scale); 81 | } 82 | } 83 | #endif 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/SpringManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6514ba86f976d724ab63844a6015b2aa 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/ThirdPersonCamera.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Unityちゃん用の三人称カメラ 3 | // 4 | // 2013/06/07 N.Kobyasahi 5 | // 6 | using UnityEngine; 7 | using System.Collections; 8 | 9 | namespace UnityChan 10 | { 11 | public class ThirdPersonCamera : MonoBehaviour 12 | { 13 | public float smooth = 3f; // カメラモーションのスムーズ化用変数 14 | Transform standardPos; // the usual position for the camera, specified by a transform in the game 15 | Transform frontPos; // Front Camera locater 16 | Transform jumpPos; // Jump Camera locater 17 | 18 | // スムーズに繋がない時(クイック切り替え)用のブーリアンフラグ 19 | bool bQuickSwitch = false; //Change Camera Position Quickly 20 | 21 | 22 | void Start () 23 | { 24 | // 各参照の初期化 25 | standardPos = GameObject.Find ("CamPos").transform; 26 | 27 | if (GameObject.Find ("FrontPos")) 28 | frontPos = GameObject.Find ("FrontPos").transform; 29 | 30 | if (GameObject.Find ("JumpPos")) 31 | jumpPos = GameObject.Find ("JumpPos").transform; 32 | 33 | //カメラをスタートする 34 | transform.position = standardPos.position; 35 | transform.forward = standardPos.forward; 36 | } 37 | 38 | void FixedUpdate () // このカメラ切り替えはFixedUpdate()内でないと正常に動かない 39 | { 40 | 41 | if (Input.GetButton ("Fire1")) { // left Ctlr 42 | // Change Front Camera 43 | setCameraPositionFrontView (); 44 | } else if (Input.GetButton ("Fire2")) { //Alt 45 | // Change Jump Camera 46 | setCameraPositionJumpView (); 47 | } else { 48 | // return the camera to standard position and direction 49 | setCameraPositionNormalView (); 50 | } 51 | } 52 | 53 | void setCameraPositionNormalView () 54 | { 55 | if (bQuickSwitch == false) { 56 | // the camera to standard position and direction 57 | transform.position = Vector3.Lerp (transform.position, standardPos.position, Time.fixedDeltaTime * smooth); 58 | transform.forward = Vector3.Lerp (transform.forward, standardPos.forward, Time.fixedDeltaTime * smooth); 59 | } else { 60 | // the camera to standard position and direction / Quick Change 61 | transform.position = standardPos.position; 62 | transform.forward = standardPos.forward; 63 | bQuickSwitch = false; 64 | } 65 | } 66 | 67 | void setCameraPositionFrontView () 68 | { 69 | // Change Front Camera 70 | bQuickSwitch = true; 71 | transform.position = frontPos.position; 72 | transform.forward = frontPos.forward; 73 | } 74 | 75 | void setCameraPositionJumpView () 76 | { 77 | // Change Jump Camera 78 | bQuickSwitch = false; 79 | transform.position = Vector3.Lerp (transform.position, jumpPos.position, Time.fixedDeltaTime * smooth); 80 | transform.forward = Vector3.Lerp (transform.forward, jumpPos.forward, Time.fixedDeltaTime * smooth); 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/ThirdPersonCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd9604897707c4879978b864a8be4d39 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/SD_UnityChan/Scripts/UnityChanControlScriptWithRgidBody.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9001bcbd91e76437cb0f52f12764f2f0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UnIndexedMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83f3a995603152142a628cde3f6e53e3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnIndexedMesh/_body_unindexed.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d36e7169031db254eb71bc7b21ae3956 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnIndexedMesh/_eye_unindexed.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38918a8b5fc03a04bba83e35ddcb27f1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnIndexedMesh/_face_unindexed.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46a819ebf2e6d7d47b0b1ab4f4a487b6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 Saki Komikado 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.2.16", 4 | "com.unity.ide.rider": "1.1.4", 5 | "com.unity.ide.vscode": "1.1.4", 6 | "com.unity.mathematics": "1.1.0", 7 | "com.unity.recorder": "2.2.0-preview.4", 8 | "com.unity.test-framework": "1.1.13", 9 | "com.unity.textmeshpro": "2.0.1", 10 | "com.unity.timeline": "1.2.14", 11 | "com.unity.ugui": "1.0.0", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.androidjni": "1.0.0", 14 | "com.unity.modules.animation": "1.0.0", 15 | "com.unity.modules.assetbundle": "1.0.0", 16 | "com.unity.modules.audio": "1.0.0", 17 | "com.unity.modules.cloth": "1.0.0", 18 | "com.unity.modules.director": "1.0.0", 19 | "com.unity.modules.imageconversion": "1.0.0", 20 | "com.unity.modules.imgui": "1.0.0", 21 | "com.unity.modules.jsonserialize": "1.0.0", 22 | "com.unity.modules.particlesystem": "1.0.0", 23 | "com.unity.modules.physics": "1.0.0", 24 | "com.unity.modules.physics2d": "1.0.0", 25 | "com.unity.modules.screencapture": "1.0.0", 26 | "com.unity.modules.terrain": "1.0.0", 27 | "com.unity.modules.terrainphysics": "1.0.0", 28 | "com.unity.modules.tilemap": "1.0.0", 29 | "com.unity.modules.ui": "1.0.0", 30 | "com.unity.modules.uielements": "1.0.0", 31 | "com.unity.modules.umbra": "1.0.0", 32 | "com.unity.modules.unityanalytics": "1.0.0", 33 | "com.unity.modules.unitywebrequest": "1.0.0", 34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 35 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 36 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 37 | "com.unity.modules.unitywebrequestwww": "1.0.0", 38 | "com.unity.modules.vehicles": "1.0.0", 39 | "com.unity.modules.video": "1.0.0", 40 | "com.unity.modules.vr": "1.0.0", 41 | "com.unity.modules.wind": "1.0.0", 42 | "com.unity.modules.xr": "1.0.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /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: 9 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_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /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/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/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/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.3.11f1 2 | m_EditorVersionWithRevision: 2019.3.11f1 (ceef2d848e70) 3 | -------------------------------------------------------------------------------- /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 | - 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/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 | # unity-mesh-fragmentizer 2 | Unity base runtime/editor mesh de-indexing library. Ordinary imported models(.fbx, .obj, etc...) are optimally indexed, which turn out to be each polygons adhere to each other. 3 | This library offers polygon detaching method in runtime or editor-time. Either way it work with model animations. 4 | -------------------------------------------------------------------------------- /output.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/output.gif -------------------------------------------------------------------------------- /output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/komietty/unity-mesh-fragmentizer/e1e68ea15cfaa12a7dcb607139b72a602b9e8be8/output.png --------------------------------------------------------------------------------