├── Assets ├── SpriteStudio.meta └── SpriteStudio │ ├── Camera.meta │ ├── Editor.meta │ ├── Script.meta │ ├── Shader.meta │ ├── Editor │ ├── Sample.meta │ ├── Sample │ │ ├── BatchImport.meta │ │ └── BatchImport │ │ │ ├── BatchList.meta │ │ │ ├── BatchList │ │ │ ├── ListingSample.txt.meta │ │ │ └── ListingSample.txt │ │ │ ├── MenuItem_SpriteStudio_Sample_BatchImport.cs.meta │ │ │ ├── LibraryEditor_SpriteStudio_Sample_BachImport.cs.meta │ │ │ ├── MenuItem_SpriteStudio_Sample_BatchImport.cs │ │ │ └── LibraryEditor_SpriteStudio_Sample_BachImport.cs │ ├── MenuItem_SpriteStudio.cs.meta │ ├── Inspector_SpriteStudio_Root.cs.meta │ ├── LibraryEditor_SpriteStudio.cs.meta │ ├── Inspector_SpriteStudio_Collider.cs.meta │ ├── Inspector_SpriteStudio_DataCell.cs.meta │ ├── Inspector_SpriteStudio_DataEffect.cs.meta │ ├── Inspector_SpriteStudio_ManagerDraw.cs.meta │ ├── Inspector_SpriteStudio_RootEffect.cs.meta │ ├── Inspector_SpriteStudio_ControlPrefab.cs.meta │ ├── Inspector_SpriteStudio_DataAnimation.cs.meta │ ├── Inspector_SpriteStudio_Collider.cs │ ├── Inspector_SpriteStudio_DataCell.cs │ ├── Inspector_SpriteStudio_DataEffect.cs │ ├── Inspector_SpriteStudio_DataAnimation.cs │ ├── Inspector_SpriteStudio_ControlPrefab.cs │ ├── Inspector_SpriteStudio_ManagerDraw.cs │ ├── Inspector_SpriteStudio_RootEffect.cs │ ├── Inspector_SpriteStudio_Root.cs │ └── MenuItem_SpriteStudio.cs │ ├── ScriptLibrary.meta │ ├── Shader │ ├── Base.meta │ ├── Particle_SpriteStudio_Add.shader.meta │ ├── Particle_SpriteStudio_Mix.shader.meta │ ├── Sprite_SpriteStudio_Add.shader.meta │ ├── Sprite_SpriteStudio_Mix.shader.meta │ ├── Sprite_SpriteStudio_Mul.shader.meta │ ├── Sprite_SpriteStudio_Sub.shader.meta │ ├── Base │ │ ├── ShaderPixel_Sprite_SpriteStudio.cginc.meta │ │ ├── ShaderVertex_Sprite_SpriteStudio.cginc.meta │ │ ├── ShaderPixel_Particle_SpriteStudio.cginc.meta │ │ ├── ShaderVertex_Particle_SpriteStudio.cginc.meta │ │ ├── ShaderPixel_Particle_SpriteStudio.cginc │ │ ├── ShaderPixel_Sprite_SpriteStudio.cginc │ │ ├── ShaderVertex_Particle_SpriteStudio.cginc │ │ └── ShaderVertex_Sprite_SpriteStudio.cginc │ ├── Particle_SpriteStudio_Add2.shader.meta │ ├── Particle_SpriteStudio_Mix.shader │ ├── Particle_SpriteStudio_Add2.shader │ ├── Sprite_SpriteStudio_Add.shader │ ├── Sprite_SpriteStudio_Mix.shader │ ├── Sprite_SpriteStudio_Sub.shader │ ├── Particle_SpriteStudio_Add.shader │ └── Sprite_SpriteStudio_Mul.shader │ ├── Camera │ ├── View3D.prefab.meta │ ├── BaseSet_Ver_1_3.meta │ ├── Camera2D Pixel (720p).prefab.meta │ ├── Camera2D Pixel (1080p).prefab.meta │ ├── BaseSet_Ver_1_3 │ │ ├── Camera Ortho (1080p).prefab.meta │ │ ├── Camera Ortho (720p).prefab.meta │ │ ├── View (Manager-Draw).prefab.meta │ │ ├── Camera Ortho (1080p).prefab │ │ ├── Camera Ortho (720p).prefab │ │ └── View (Manager-Draw).prefab │ ├── View3D.prefab │ ├── Camera2D Pixel (1080p).prefab │ └── Camera2D Pixel (720p).prefab │ ├── ScriptLibrary │ ├── Utility.meta │ ├── Utility │ │ ├── Random.meta │ │ ├── Parts.cs.meta │ │ ├── TableCellChange.cs.meta │ │ ├── TableMaterial.cs.meta │ │ ├── Random │ │ │ ├── MersenneTwister.cs.meta │ │ │ ├── XorShift32.cs.meta │ │ │ ├── XorShift32.cs │ │ │ └── MersenneTwister.cs │ │ ├── Parts.cs │ │ ├── TableMaterial.cs │ │ └── TableCellChange.cs │ ├── Library_SpriteStudio.cs.meta │ ├── Data.meta │ └── Data │ │ ├── Pack.meta │ │ ├── Attribute.cs.meta │ │ ├── Pack │ │ ├── Flyweight.cs.meta │ │ ├── Standard.cs.meta │ │ ├── Flyweight.cs │ │ └── Standard.cs │ │ └── Attribute.cs │ └── Script │ ├── Script_SpriteStudio_Collider.cs.meta │ ├── Script_SpriteStudio_DataCell.cs.meta │ ├── Script_SpriteStudio_DataEffect.cs.meta │ ├── Script_SpriteStudio_Root.cs.meta │ ├── Script_SpriteStudio_ControlPrefab.cs.meta │ ├── Script_SpriteStudio_DataAnimation.cs.meta │ ├── Script_SpriteStudio_ManagerDraw.cs.meta │ ├── Script_SpriteStudio_RootEffect.cs.meta │ ├── Script_SpriteStudio_DataCell.cs │ ├── Script_SpriteStudio_ControlPrefab.cs │ ├── Script_SpriteStudio_DataEffect.cs │ ├── Script_SpriteStudio_Collider.cs │ ├── Script_SpriteStudio_DataAnimation.cs │ └── Script_SpriteStudio_ManagerDraw.cs ├── README.md ├── ProjectSettings ├── TagManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── EditorSettings.asset ├── InputManager.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── DynamicsManager.asset ├── ProjectSettings.asset ├── QualitySettings.asset └── EditorBuildSettings.asset ├── .gitignore ├── .gitattributes └── LICENSE /Assets/SpriteStudio.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d76e527112538f14bad8083f4c197dee 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02d3c77c8406f0a41b258eb678ae2b48 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d695ec023b1adda4f9d47fcdf42081c7 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d6093a8e35124642adaf4a5362945d5 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89e135f2d75ad7744ac77f7da72f4dff 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb0aba5a698425a46afbda7031bb3bd1 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 303a669f669e707459689e5842fc2e92 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a35d7ff928161f1418260b150caf2cf3 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/View3D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbc95ed9b3a09f541b50436cf48f9a16 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7152b7026e7b4fe4f932995cebf04eb8 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab35bb6e57a6d4243aa1b99e7e83298c 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787e5c845cd96fc46bacc1b2dceff424 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Random.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 332bb26ae5faf4645aa7ada6ee9daed4 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SS5Player for Unity 2 | 3 | ドキュメントはこちらです。 4 | https://github.com/SpriteStudio/SS5PlayerForUnity/wiki 5 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/Camera2D Pixel (720p).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1a919391382d5b41b793520189a030f 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/BatchList.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d02c5964a6bee342b13fa9e1a4b328c 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/Camera2D Pixel (1080p).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35460d3e00fb95e4d81ed017272a2b1c 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Add.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bfd473a7f0c62e4c99cb14e4802b5b9 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Mix.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 329f40a802fe5134781bdde1d8b49c86 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Add.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: effc129d316465d4a82b2a1edf2297c6 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Mix.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1b10eb896c5bf64abc83db86edc4145 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Mul.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d8c3b64ec494da40adfffe40186361c 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Sub.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bcafd3152f21d94da0870814c02c586 3 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (1080p).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b65b31ca0a589ea43a805feb835812bf 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (720p).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdfc2d7dc6fb8e648b5d7fbfccca7e18 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/View (Manager-Draw).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c5c0dd4ddf350d45a59a5d6fa338580 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderPixel_Sprite_SpriteStudio.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4f7a5e9ca94c1143aee2468d6b7e38d 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderVertex_Sprite_SpriteStudio.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 791d329d9f7feb24992a1505ceb32e11 3 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/View3D.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/View3D.prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/BatchList/ListingSample.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bad53f0d73e3fde45ab23b225d21a493 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderPixel_Particle_SpriteStudio.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4999b0a3b29687b49b46dc2f0a5fa4c4 3 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderVertex_Particle_SpriteStudio.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b72bbbd6288515489854506e4529b29 3 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/Camera2D Pixel (1080p).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/Camera2D Pixel (1080p).prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/Camera2D Pixel (720p).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/Camera2D Pixel (720p).prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (1080p).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (1080p).prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (720p).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/Camera Ortho (720p).prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/View (Manager-Draw).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpriteStudio/SS5PlayerForUnity/HEAD/Assets/SpriteStudio/Camera/BaseSet_Ver_1_3/View (Manager-Draw).prefab -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Parts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff99e203f84a3b04eaf9bff852132f6c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/MenuItem_SpriteStudio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c146c160e4de79c469f5fda17531ec42 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | 5 | # Autogenerated VS/MD solution and project files 6 | *.csproj 7 | *.unityproj 8 | *.sln 9 | *.pidb 10 | *.userprefs 11 | Assets/_TEST.meta 12 | Assets/_TEST/ 13 | /Assets/AssetStoreTools 14 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_Root.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b70b25259ff2b3f42a19df9326b93667 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/LibraryEditor_SpriteStudio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7354db9aebed17f4e9961a8cb6bf2271 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_Collider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15f509301c5172c4698c11729686c84b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataCell.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2c3e2fd293409448b70e6699a65a249 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b77bdb9fe353eee4bab17478c1cb2c81 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_Root.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fcac163d54e9e347a08bfdaa5629987 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 100 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Library_SpriteStudio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 624e8abb29a91ee489a369813e83367d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/TableCellChange.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08fc9edc92be0fe439caf009d03f4b99 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/TableMaterial.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2d4504c4a984f649bab91418844697a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_Collider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e58f9c5a1538577449639e9f6d0d69ca 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataCell.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cee755f601bc7a46bfd96fcd18a5d6b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0fcb68af33298d44b19a6eef79fcd49 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_ManagerDraw.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d02a9c3420a11d44b8cd6f34e9b371d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_RootEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2960e0cfa6ab9c4d99b580507bac175 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_ControlPrefab.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59bb59296e110f54885d978d35c0574f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8146f12f552f861448ab623a551361dd 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_ManagerDraw.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da7bac91b13a6f642be1332960068239 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 200 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_RootEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a2385228c1d2514eb7efce1337ce449 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 101 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_ControlPrefab.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ecc4cad2c72d7f4aa4d0c02c822cd39 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3babacba4ef59c64497fe4586f895eba 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Random/MersenneTwister.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1359bfdfc5aeef64b8a2e5f193c320c9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 429f1e31e43276b439bb9828a71c911a 3 | folderAsset: yes 4 | timeCreated: 1487528375 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/MenuItem_SpriteStudio_Sample_BatchImport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 528c3e72b3966f64484f617e4e40f8d7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Pack.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4e5420c8a49c3a4f813a4eb05cf6447 3 | folderAsset: yes 4 | timeCreated: 1487875784 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/LibraryEditor_SpriteStudio_Sample_BachImport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10d07a45f91ce514fb226455af9683db 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Add2.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 858d8fd277cefa94b9eaccb234e24047 3 | timeCreated: 1455201395 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Attribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53244aba5a496e14390e1f5d988c6d2a 3 | timeCreated: 1487877053 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Pack/Flyweight.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99d2581afff8d5542800e1d78de25c22 3 | timeCreated: 1487528410 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Pack/Standard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e49a9db041d1c92469814e972300d069 3 | timeCreated: 1487703029 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Random/XorShift32.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 609cd3877bbead34daa6475facace3e0 3 | timeCreated: 1461995310 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderPixel_Particle_SpriteStudio.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | #define LIMIT_ALPHA 0.0038 8 | 9 | sampler2D _MainTex; 10 | 11 | #ifdef SV_Target 12 | fixed4 PS_main(InputPS Input) : SV_Target 13 | #else 14 | fixed4 PS_main(InputPS Input) : COLOR0 15 | #endif 16 | { 17 | fixed4 Output; 18 | 19 | fixed4 Pixel = tex2D(_MainTex, Input.Texture00UV.xy); 20 | Pixel *= Input.ColorMain; 21 | Output = Pixel; 22 | 23 | return(Output); 24 | } 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_Collider.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System.Collections; 10 | 11 | [CustomEditor(typeof(Script_SpriteStudio_Collider))] 12 | public class Inspector_SpriteStudio_Collider : Editor 13 | { 14 | public override void OnInspectorGUI() 15 | { 16 | EditorGUILayout.LabelField("[SpriteStudio Collider]"); 17 | // Script_SpriteStudio_Collider Data = (Script_SpriteStudio_Collider)target; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataCell.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | #if false 8 | using UnityEngine; 9 | using UnityEditor; 10 | using System.Collections; 11 | 12 | [CustomEditor(typeof(Script_SpriteStudio_DataCell))] 13 | public class Inspector_SpriteStudio_DataCell : Editor 14 | { 15 | public override void OnInspectorGUI() 16 | { 17 | EditorGUILayout.LabelField("[SpriteStudio CellMap-Data]"); 18 | Script_SpriteStudio_DataCell Data = (Script_SpriteStudio_DataCell)target; 19 | } 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataEffect.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | #if false 8 | using UnityEngine; 9 | using UnityEditor; 10 | using System.Collections; 11 | 12 | [CustomEditor(typeof(Script_SpriteStudio_DataEffect))] 13 | public class Inspector_SpriteStudio_DataEffect : Editor 14 | { 15 | public override void OnInspectorGUI() 16 | { 17 | EditorGUILayout.LabelField("[SpriteStudio Effect-Data]"); 18 | Script_SpriteStudio_DataEffect Data = (Script_SpriteStudio_DataEffect)target; 19 | } 20 | } 21 | #endif -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_DataAnimation.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | #if false 8 | using UnityEngine; 9 | using UnityEditor; 10 | using System.Collections; 11 | 12 | [CustomEditor(typeof(Script_SpriteStudio_DataAnimation))] 13 | public class Inspector_SpriteStudio_DataAnimation : Editor 14 | { 15 | public override void OnInspectorGUI() 16 | { 17 | EditorGUILayout.LabelField("[SpriteStudio Animation-Data]"); 18 | Script_SpriteStudio_DataAnimation Data = (Script_SpriteStudio_DataAnimation)target; 19 | } 20 | } 21 | #endif -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Mix.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Effect/Mix" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | } 11 | 12 | SubShader { 13 | Tags { 14 | "Queue"="Transparent" 15 | "IgnoreProjector"="True" 16 | "RenderType"="Transparent" 17 | } 18 | 19 | Pass { 20 | Lighting Off 21 | Fog { Mode off } 22 | 23 | Cull Off 24 | ZTest LEqual 25 | ZWRITE Off 26 | 27 | Blend SrcAlpha OneMinusSrcAlpha 28 | 29 | CGPROGRAM 30 | #pragma vertex VS_main 31 | #pragma fragment PS_main 32 | 33 | #include "UnityCG.cginc" 34 | 35 | #include "Base/ShaderVertex_Particle_SpriteStudio.cginc" 36 | 37 | #include "Base/ShaderPixel_Particle_SpriteStudio.cginc" 38 | 39 | ENDCG 40 | 41 | SetTexture [_MainTex] { 42 | Combine Texture, Texture 43 | } 44 | } 45 | } 46 | FallBack Off 47 | } 48 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Add2.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Effect/Add2" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | } 11 | 12 | SubShader { 13 | Tags { 14 | "Queue"="Transparent" 15 | "IgnoreProjector"="True" 16 | "RenderType"="Transparent" 17 | } 18 | 19 | Pass { 20 | // MEMO: Blend "Add", "Straight-Alpha" 21 | Lighting Off 22 | Fog { Mode off } 23 | 24 | Cull Off 25 | ZTest LEqual 26 | ZWRITE Off 27 | 28 | Blend SrcAlpha One 29 | 30 | CGPROGRAM 31 | #pragma vertex VS_main 32 | #pragma fragment PS_main 33 | 34 | #include "UnityCG.cginc" 35 | 36 | #include "Base/ShaderVertex_Particle_SpriteStudio.cginc" 37 | 38 | #include "Base/ShaderPixel_Particle_SpriteStudio.cginc" 39 | ENDCG 40 | 41 | SetTexture [_MainTex] { 42 | Combine Texture, Texture 43 | } 44 | } 45 | } 46 | FallBack Off 47 | } 48 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataCell.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | [System.Serializable] 10 | public partial class Script_SpriteStudio_DataCell : ScriptableObject 11 | { 12 | public Library_SpriteStudio.Data.CellMap[] ListDataCellMap; 13 | 14 | public int CountGetCellMap() 15 | { 16 | return((null != ListDataCellMap) ? ListDataCellMap.Length : -1); 17 | } 18 | public int IndexGetCellMap(string Name) 19 | { 20 | if(true == string.IsNullOrEmpty(Name)) 21 | { 22 | return(-1); 23 | } 24 | 25 | int Count = ListDataCellMap.Length; 26 | for(int i=0; i Index)) ? ListDataCellMap[Index] : null); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderPixel_Sprite_SpriteStudio.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | #define LIMIT_ALPHA 0.0038 8 | sampler2D _MainTex; 9 | 10 | #ifdef SV_Target 11 | fixed4 PS_main(InputPS Input) : SV_Target 12 | #else 13 | fixed4 PS_main(InputPS Input) : COLOR0 14 | #endif 15 | { 16 | fixed4 Output; 17 | 18 | fixed4 Pixel = tex2D(_MainTex, Input.Texture00UV.xy); 19 | Pixel *= Input.ColorMain; 20 | 21 | fixed4 OverlayParameter = Input.ParameterOverlay; 22 | fixed4 ColorOverlay = Input.ColorOverlay; 23 | fixed ColorAlpha = ColorOverlay.a; 24 | fixed PixelAlpha = Pixel.a; 25 | 26 | fixed4 PixelCoefficientColorOvelay = ((0.0f > OverlayParameter.z) ? fixed4(1.0f, 1.0f, 1.0f, 1.0f) : (Pixel * OverlayParameter.z)); 27 | ColorOverlay *= ColorAlpha; 28 | 29 | Pixel = ((Pixel * (1.0f - (ColorAlpha * OverlayParameter.y))) * OverlayParameter.x) + (PixelCoefficientColorOvelay * ColorOverlay * OverlayParameter.w); 30 | Pixel.a = PixelAlpha; 31 | Output = Pixel; 32 | 33 | return(Output); 34 | } 35 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/MenuItem_SpriteStudio_Sample_BatchImport.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System; 10 | using System.IO; 11 | using System.Xml; 12 | using System.Text; 13 | using System.Collections; 14 | using System.Collections.Generic; 15 | 16 | public sealed class MenuItem_SpriteStudio_Sample_BatchImport : EditorWindow 17 | { 18 | [MenuItem("Tools/SpriteStudio/Sample/BatchImport(sspj)")] 19 | static void OpenWindow() 20 | { 21 | EditorWindow.GetWindow(true, "OPTPiX SpriteStudio BatchImport-Sample"); 22 | } 23 | void OnGUI() 24 | { 25 | if(true == GUILayout.Button("Choose List-File & Import")) 26 | { 27 | string NameListFile = EditorUtility.OpenFilePanel("Select List-File(Text)", "", "txt"); 28 | if(false == String.IsNullOrEmpty(NameListFile)) 29 | { 30 | LibraryEditor_SpriteStudio_Sample_BachImport.Menu.ImportSSPJBatch(NameListFile); 31 | Close(); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Web Technology Corp. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_ControlPrefab.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System.Collections; 10 | 11 | [CustomEditor(typeof(Script_SpriteStudio_ControlPrefab))] 12 | public class Inspector_SpriteStudio_ControlPrefab : Editor 13 | { 14 | public override void OnInspectorGUI() 15 | { 16 | Script_SpriteStudio_ControlPrefab Data = (Script_SpriteStudio_ControlPrefab)target; 17 | 18 | EditorGUILayout.LabelField("[SpriteStudio Control-Prefab]"); 19 | int LevelIndent = 0; 20 | 21 | EditorGUI.indentLevel = LevelIndent; 22 | 23 | EditorGUILayout.Space(); 24 | Data.InstanceManagerDraw = (Script_SpriteStudio_ManagerDraw)(EditorGUILayout.ObjectField("View (DrawManager)", Data.InstanceManagerDraw, typeof(Script_SpriteStudio_ManagerDraw), true)); 25 | 26 | EditorGUILayout.Space(); 27 | Data.PrefabUnderControl = EditorGUILayout.ObjectField("Prefab", Data.PrefabUnderControl, typeof(GameObject), true); 28 | 29 | if(true == GUI.changed) 30 | { 31 | EditorUtility.SetDirty(target); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderVertex_Particle_SpriteStudio.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | 8 | float4 _OverlayParameter_Non; 9 | float4 _OverlayParameter_Mix; 10 | float4 _OverlayParameter_Add; 11 | float4 _OverlayParameter_Sub; 12 | float4 _OverlayParameter_Mul; 13 | 14 | struct InputVS { 15 | float4 vertex : POSITION; 16 | float4 color : COLOR0; 17 | float4 texcoord : TEXCOORD0; 18 | float4 texcoord1 : TEXCOORD1; 19 | }; 20 | 21 | struct InputPS { 22 | #ifdef SV_POSITION 23 | float4 Position : SV_POSITION; 24 | #else 25 | float4 Position : POSITION; 26 | #endif 27 | float4 ColorMain : COLOR0; 28 | float4 Texture00UV : TEXCOORD0; 29 | float4 PositionDraw : TEXCOORD7; 30 | }; 31 | 32 | InputPS VS_main(InputVS Input) 33 | { 34 | InputPS Output; 35 | float4 Temp; 36 | 37 | Temp.xy = Input.texcoord.xy; 38 | Temp.z = 0.0f; 39 | Temp.w = 0.0f; 40 | Output.Texture00UV = Temp; 41 | 42 | Temp = Input.color; 43 | Temp.w *= Input.texcoord1.x; 44 | Output.ColorMain = Temp; 45 | 46 | Temp = Input.vertex; 47 | Temp = mul(UNITY_MATRIX_MVP, Temp); 48 | Output.PositionDraw = Temp; 49 | Output.Position = Temp; 50 | 51 | return Output; 52 | } 53 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_ControlPrefab.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | [ExecuteInEditMode] 10 | [System.Serializable] 11 | public partial class Script_SpriteStudio_ControlPrefab : MonoBehaviour 12 | { 13 | public Script_SpriteStudio_ManagerDraw InstanceManagerDraw; 14 | public Object PrefabUnderControl; 15 | 16 | // void Awake() 17 | // { 18 | // } 19 | 20 | void Start() 21 | { 22 | if(null != PrefabUnderControl) 23 | { 24 | GameObject InstanceGameObjectChild = Library_SpriteStudio.Miscellaneousness.Asset.PrefabInstantiateChild(gameObject, (GameObject)PrefabUnderControl, null, false); 25 | if(null != InstanceGameObjectChild) 26 | { 27 | /* Instantiate Under-Control Prefab */ 28 | Script_SpriteStudio_Root InstanceRootChild = InstanceGameObjectChild.GetComponent(); 29 | if(null != InstanceRootChild) 30 | { 31 | InstanceRootChild.InstanceGameObjectControl = gameObject; 32 | 33 | if(null == InstanceRootChild.InstanceManagerDraw) 34 | { 35 | InstanceRootChild.InstanceManagerDraw = InstanceManagerDraw; 36 | } 37 | } 38 | 39 | } 40 | } 41 | } 42 | 43 | // void Update() 44 | // { 45 | // } 46 | 47 | // void LateUpdate() 48 | // { 49 | // } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Add.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Add" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | _OverlayParameter_Non ("Parameter(Non)", Vector) = (1.0, 0.0, -1.0, 0.0) 11 | _OverlayParameter_Mix ("Parameter(Mix)", Vector) = (1.0, 1.0, -1.0, 1.0) 12 | _OverlayParameter_Add ("Parameter(Add)", Vector) = (1.0, 0.0, -1.0, 1.0) 13 | _OverlayParameter_Sub ("Parameter(Sub)", Vector) = (1.0, 0.0, -1.0, -1.0) 14 | _OverlayParameter_Mul ("Parameter(Mul)", Vector) = (1.0, 1.0, 1.0, 1.0) 15 | } 16 | 17 | SubShader { 18 | Tags { 19 | "Queue"="Transparent" 20 | "IgnoreProjector"="True" 21 | "RenderType"="Transparent" 22 | } 23 | 24 | Pass { 25 | Lighting Off 26 | Fog { Mode off } 27 | 28 | Cull Off 29 | ZTest LEqual 30 | ZWRITE Off 31 | 32 | Blend SrcAlpha One 33 | 34 | CGPROGRAM 35 | #pragma vertex VS_main 36 | #pragma fragment PS_main 37 | 38 | #include "UnityCG.cginc" 39 | 40 | #include "Base/ShaderVertex_Sprite_SpriteStudio.cginc" 41 | 42 | #include "Base/ShaderPixel_Sprite_SpriteStudio.cginc" 43 | 44 | ENDCG 45 | 46 | SetTexture [_MainTex] { 47 | Combine Texture, Texture 48 | } 49 | } 50 | } 51 | FallBack Off 52 | } 53 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Mix.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Mix" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | _OverlayParameter_Non ("Parameter(Non)", Vector) = (1.0, 0.0, -1.0, 0.0) 11 | _OverlayParameter_Mix ("Parameter(Mix)", Vector) = (1.0, 1.0, -1.0, 1.0) 12 | _OverlayParameter_Add ("Parameter(Add)", Vector) = (1.0, 0.0, -1.0, 1.0) 13 | _OverlayParameter_Sub ("Parameter(Sub)", Vector) = (1.0, 0.0, -1.0, -1.0) 14 | _OverlayParameter_Mul ("Parameter(Mul)", Vector) = (1.0, 1.0, 1.0, 1.0) 15 | } 16 | 17 | SubShader { 18 | Tags { 19 | "Queue"="Transparent" 20 | "IgnoreProjector"="True" 21 | "RenderType"="Transparent" 22 | } 23 | 24 | Pass { 25 | Lighting Off 26 | Fog { Mode off } 27 | 28 | Cull Off 29 | ZTest LEqual 30 | ZWRITE Off 31 | 32 | Blend SrcAlpha OneMinusSrcAlpha 33 | 34 | CGPROGRAM 35 | #pragma vertex VS_main 36 | #pragma fragment PS_main 37 | 38 | #include "UnityCG.cginc" 39 | 40 | #include "Base/ShaderVertex_Sprite_SpriteStudio.cginc" 41 | 42 | #include "Base/ShaderPixel_Sprite_SpriteStudio.cginc" 43 | 44 | ENDCG 45 | 46 | SetTexture [_MainTex] { 47 | Combine Texture, Texture 48 | } 49 | } 50 | } 51 | FallBack Off 52 | } 53 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Sub.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Sub" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | _OverlayParameter_Non ("Parameter(Non)", Vector) = (1.0, 0.0, -1.0, 0.0) 11 | _OverlayParameter_Mix ("Parameter(Mix)", Vector) = (1.0, 1.0, -1.0, 1.0) 12 | _OverlayParameter_Add ("Parameter(Add)", Vector) = (1.0, 0.0, -1.0, 1.0) 13 | _OverlayParameter_Sub ("Parameter(Sub)", Vector) = (1.0, 0.0, -1.0, -1.0) 14 | _OverlayParameter_Mul ("Parameter(Mul)", Vector) = (1.0, 1.0, 1.0, 1.0) 15 | } 16 | 17 | SubShader { 18 | Tags { 19 | "Queue"="Transparent" 20 | "IgnoreProjector"="True" 21 | "RenderType"="Transparent" 22 | } 23 | 24 | Pass { 25 | Lighting Off 26 | Fog { Mode off } 27 | 28 | Cull Off 29 | ZTest LEqual 30 | ZWRITE Off 31 | 32 | BlendOp RevSub 33 | Blend SrcAlpha One 34 | 35 | CGPROGRAM 36 | #pragma vertex VS_main 37 | #pragma fragment PS_main 38 | 39 | #include "UnityCG.cginc" 40 | 41 | #include "Base/ShaderVertex_Sprite_SpriteStudio.cginc" 42 | 43 | #include "Base/ShaderPixel_Sprite_SpriteStudio.cginc" 44 | 45 | ENDCG 46 | 47 | SetTexture [_MainTex] { 48 | Combine Texture, Texture 49 | } 50 | } 51 | } 52 | FallBack Off 53 | } 54 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Particle_SpriteStudio_Add.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Effect/Add" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | } 11 | 12 | SubShader { 13 | Tags { 14 | "Queue"="Transparent" 15 | "IgnoreProjector"="True" 16 | "RenderType"="Transparent" 17 | } 18 | 19 | Pass { 20 | // MEMO: Blend "Add", "PreMultiplied-Alpha" 21 | Lighting Off 22 | Fog { Mode off } 23 | 24 | Cull Off 25 | ZTest LEqual 26 | ZWRITE Off 27 | 28 | Blend SrcAlpha One 29 | // Blend SrcColor One 30 | 31 | CGPROGRAM 32 | #pragma vertex VS_main 33 | #pragma fragment PS_main 34 | 35 | #include "UnityCG.cginc" 36 | 37 | #include "Base/ShaderVertex_Particle_SpriteStudio.cginc" 38 | 39 | // #include "Base/ShaderPixel_Particle_SpriteStudio.cginc" 40 | #define LIMIT_ALPHA 0.0038 41 | sampler2D _MainTex; 42 | #ifdef SV_Target 43 | fixed4 PS_main(InputPS Input) : SV_Target 44 | #else 45 | fixed4 PS_main(InputPS Input) : COLOR0 46 | #endif 47 | { 48 | fixed4 Output; 49 | 50 | fixed4 Pixel = tex2D(_MainTex, Input.Texture00UV.xy); 51 | Pixel *= Input.ColorMain; 52 | Pixel *= Pixel.a; 53 | // Pixel.a = 1.0f; 54 | Output = Pixel; 55 | 56 | return(Output); 57 | } 58 | 59 | ENDCG 60 | 61 | SetTexture [_MainTex] { 62 | Combine Texture, Texture 63 | } 64 | } 65 | } 66 | FallBack Off 67 | } 68 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Base/ShaderVertex_Sprite_SpriteStudio.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | float4 _OverlayParameter_Non; 8 | float4 _OverlayParameter_Mix; 9 | float4 _OverlayParameter_Add; 10 | float4 _OverlayParameter_Sub; 11 | float4 _OverlayParameter_Mul; 12 | 13 | struct InputVS { 14 | float4 vertex : POSITION; 15 | float4 color : COLOR0; 16 | float4 texcoord : TEXCOORD0; 17 | float4 texcoord1 : TEXCOORD1; 18 | }; 19 | 20 | struct InputPS { 21 | #ifdef SV_POSITION 22 | float4 Position : SV_POSITION; 23 | #else 24 | float4 Position : POSITION; 25 | #endif 26 | float4 ColorMain : COLOR0; 27 | float4 ColorOverlay : COLOR1; 28 | float4 Texture00UV : TEXCOORD0; 29 | float4 ParameterOverlay : TEXCOORD1; 30 | float4 PositionDraw : TEXCOORD7; 31 | }; 32 | 33 | InputPS VS_main(InputVS Input) 34 | { 35 | InputPS Output; 36 | float4 Temp; 37 | 38 | Temp.xy = Input.texcoord.xy; 39 | Temp.z = 0.0f; 40 | Temp.w = 0.0f; 41 | Output.Texture00UV = Temp; 42 | 43 | Temp = float4(1.0f, 1.0f, 1.0f, Input.texcoord1.x); 44 | Output.ColorMain = Temp; 45 | 46 | Output.ColorOverlay = Input.color; 47 | 48 | float Index = Input.texcoord1.y; 49 | Temp = (0.1f > Index) ? _OverlayParameter_Non 50 | : ((3.0f > Index) ? ((2.0f > Index) ? _OverlayParameter_Mix : _OverlayParameter_Add) 51 | : ((4.0 > Index) ? _OverlayParameter_Sub : _OverlayParameter_Mul) 52 | ); 53 | Output.ParameterOverlay = Temp; 54 | 55 | Temp = Input.vertex; 56 | Temp = mul(UNITY_MATRIX_MVP, Temp); 57 | Output.PositionDraw = Temp; 58 | Output.Position = Temp; 59 | 60 | return Output; 61 | } 62 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataEffect.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | [System.Serializable] 10 | public partial class Script_SpriteStudio_DataEffect : ScriptableObject 11 | { 12 | /* Parameters */ 13 | [System.Flags] 14 | public enum FlagBit 15 | { 16 | SEEDRANDOM_LOCK = 0x00000001, 17 | 18 | IMPORTED_BY_VER1_4_ORLATER = 0x70000000, 19 | 20 | CLEAR = 0x00000000 21 | } 22 | public FlagBit FlagData; 23 | 24 | public int SeedRandom; 25 | public int VersionRenderer; 26 | 27 | public int CountMaxParticle; 28 | public int CountFramePerSecond; 29 | 30 | public Vector2 ScaleLayout; 31 | 32 | /* Parts-Relation Data */ 33 | public Library_SpriteStudio.Data.PartsEffect[] ListDataParts; 34 | 35 | /* Emitters' Data */ 36 | public Library_SpriteStudio.Data.EmitterEffect[] ListDataEmitter; 37 | 38 | public int CountGetParts() 39 | { 40 | return(ListDataParts.Length); 41 | } 42 | public Library_SpriteStudio.Data.PartsEffect DataGetParts(int Index) 43 | { 44 | return(((0 <= Index) && (ListDataParts.Length > Index)) ? ListDataParts[Index] : null); 45 | } 46 | public int IndexGetParts(string Name) 47 | { 48 | if(true == string.IsNullOrEmpty(Name)) 49 | { 50 | return(-1); 51 | } 52 | 53 | int Count = ListDataParts.Length; 54 | for(int i=0; i Index)) ? ListDataEmitter[Index] : null); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_Collider.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | [ExecuteInEditMode] 10 | [System.Serializable] 11 | public partial class Script_SpriteStudio_Collider : MonoBehaviour 12 | { 13 | /* Relation Datas */ 14 | public Script_SpriteStudio_Root InstanceRoot; 15 | public int IDParts; 16 | 17 | /* WorkArea for Runtime (Root's WorkArea) */ 18 | internal float ColliderRadiusPrevious = -1.0f; /* for Radius-Collision */ 19 | internal Vector2 ColliderRectSizePrevious = Vector2.zero; /* for Rectangle-Collision */ 20 | internal Vector2 ColliderRectPivotPrevious = Vector2.zero; /* for Rectangle-Collision */ 21 | 22 | // void Awake() 23 | // { 24 | // } 25 | 26 | // void Start() 27 | // { 28 | // } 29 | 30 | // void Update() 31 | // { 32 | // } 33 | 34 | // void LateUpdate() 35 | // { 36 | // } 37 | 38 | void OnTriggerEnter(Collider Pair) 39 | { 40 | if(null != InstanceRoot) 41 | { 42 | InstanceRoot.CallBackExecColliderOnTriggerEnter(IDParts, Pair); 43 | } 44 | } 45 | 46 | void OnTriggerExit(Collider Pair) 47 | { 48 | if(null != InstanceRoot) 49 | { 50 | InstanceRoot.CallBackExecColliderOnTriggerExit(IDParts, Pair); 51 | } 52 | } 53 | 54 | void OnTriggerStay(Collider Pair) 55 | { 56 | if(null != InstanceRoot) 57 | { 58 | InstanceRoot.CallBackExecColliderOnTriggerStay(IDParts, Pair); 59 | } 60 | } 61 | 62 | void OnCollisionEnter(Collision Contacts) 63 | { 64 | if(null != InstanceRoot) 65 | { 66 | InstanceRoot.CallBackExecCollisionTriggerEnter(IDParts, Contacts); 67 | } 68 | } 69 | 70 | void OnCollisionExit(Collision Contacts) 71 | { 72 | if(null != InstanceRoot) 73 | { 74 | InstanceRoot.CallBackExecCollisionTriggerExit(IDParts, Contacts); 75 | } 76 | } 77 | 78 | void OnCollisionStay(Collision Contacts) 79 | { 80 | if(null != InstanceRoot) 81 | { 82 | InstanceRoot.CallBackExecCollisionTriggerStay(IDParts, Contacts); 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /Assets/SpriteStudio/Shader/Sprite_SpriteStudio_Mul.shader: -------------------------------------------------------------------------------- 1 | // 2 | // SpriteStudio5 Player for Unity 3 | // 4 | // Copyright(C) Web Technology Corp. 5 | // All rights reserved. 6 | // 7 | Shader "Custom/SpriteStudio5/Mul" { 8 | Properties { 9 | _MainTex ("Base (RGB)", 2D) = "white" {} 10 | _OverlayParameter_Non ("Parameter(Non)", Vector) = (1.0, 0.0, -1.0, 0.0) 11 | _OverlayParameter_Mix ("Parameter(Mix)", Vector) = (1.0, 1.0, -1.0, 1.0) 12 | _OverlayParameter_Add ("Parameter(Add)", Vector) = (1.0, 0.0, -1.0, 1.0) 13 | _OverlayParameter_Sub ("Parameter(Sub)", Vector) = (1.0, 0.0, -1.0, -1.0) 14 | _OverlayParameter_Mul ("Parameter(Mul)", Vector) = (1.0, 1.0, 1.0, 1.0) 15 | } 16 | 17 | SubShader { 18 | Tags { 19 | "Queue"="Transparent" 20 | "IgnoreProjector"="True" 21 | "RenderType"="Transparent" 22 | } 23 | 24 | Pass { 25 | Lighting Off 26 | Fog { Mode off } 27 | 28 | Cull Off 29 | ZTest LEqual 30 | ZWRITE Off 31 | 32 | Blend Zero SrcColor 33 | 34 | CGPROGRAM 35 | #pragma vertex VS_main 36 | #pragma fragment PS_main 37 | 38 | #include "UnityCG.cginc" 39 | 40 | #include "Base/ShaderVertex_Sprite_SpriteStudio.cginc" 41 | 42 | // #include "Base/ShaderPixel_Sprite_SpriteStudio.cginc" 43 | #define LIMIT_ALPHA 0.0038 44 | 45 | sampler2D _MainTex; 46 | #ifdef SV_Target 47 | fixed4 PS_main(InputPS Input) : SV_Target 48 | #else 49 | fixed4 PS_main(InputPS Input) : COLOR0 50 | #endif 51 | { 52 | fixed4 Output; 53 | 54 | fixed4 Pixel = tex2D(_MainTex, Input.Texture00UV.xy); 55 | Pixel *= Input.ColorMain; 56 | 57 | fixed4 OverlayParameter = Input.ParameterOverlay; 58 | fixed4 ColorOverlay = Input.ColorOverlay; 59 | fixed ColorAlpha = ColorOverlay.a; 60 | fixed PixelAlpha = Pixel.a; 61 | 62 | fixed4 PixelCoefficientColorOvelay = ((0.0f > OverlayParameter.z) ? fixed4(1.0f, 1.0f, 1.0f, 1.0f) : (Pixel * OverlayParameter.z)); 63 | ColorOverlay *= ColorAlpha; 64 | 65 | Pixel = ((Pixel * (1.0f - (ColorAlpha * OverlayParameter.y))) * OverlayParameter.x) + (PixelCoefficientColorOvelay * ColorOverlay * OverlayParameter.w); 66 | Pixel *= PixelAlpha; // Mul Only. 67 | Pixel += fixed4(1.0f, 1.0f, 1.0f, 1.0f) * (1.0 - PixelAlpha); // Mul Only. 68 | Pixel.w = 1.0f; // Mul Only. 69 | Output = Pixel; 70 | 71 | return(Output); 72 | } 73 | ENDCG 74 | 75 | SetTexture [_MainTex] { 76 | Combine Texture, Texture 77 | } 78 | } 79 | } 80 | FallBack Off 81 | } 82 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Script/Script_SpriteStudio_DataAnimation.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | [System.Serializable] 10 | public partial class Script_SpriteStudio_DataAnimation : ScriptableObject 11 | { 12 | /* Parts-Relation Data */ 13 | public Library_SpriteStudio.Data.Parts[] ListDataParts; 14 | 15 | /* Animation Data */ 16 | public Library_SpriteStudio.Data.Animation[] ListDataAnimation; 17 | 18 | /* Data-Instance Factory */ 19 | public Library_SpriteStudio.Data.Pack.Flyweight.Factory Flyweight; 20 | 21 | public int CountGetParts() 22 | { 23 | return(ListDataParts.Length); 24 | } 25 | public int CountGetPartsDraw() 26 | { 27 | int CountParts = ListDataParts.Length; 28 | int Count = 0; 29 | Library_SpriteStudio.Data.Parts DataParts = null; 30 | for(int i=0; i Index)) ? ListDataParts[Index] : null); 53 | } 54 | public int IndexGetParts(string Name) 55 | { 56 | if(true == string.IsNullOrEmpty(Name)) 57 | { 58 | return(-1); 59 | } 60 | 61 | int Count = ListDataParts.Length; 62 | for(int i=0; i Index)) ? ListDataAnimation[Index] : null); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Random/XorShift32.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | // #define CALCULATE_ULONG 8 | 9 | using UnityEngine; 10 | 11 | public static partial class Library_SpriteStudio 12 | { 13 | public static partial class Utility 14 | { 15 | public static partial class Random 16 | { 17 | public class XorShift32 : Library_SpriteStudio.Utility.Random.Generator 18 | { 19 | #if CALCULATE_ULONG 20 | protected ulong SeedNow; 21 | #else 22 | protected uint SeedNow; 23 | #endif 24 | 25 | public XorShift32() 26 | { 27 | #if CALCULATE_ULONG 28 | SeedNow = 0L; 29 | #else 30 | SeedNow = 0; 31 | #endif 32 | } 33 | 34 | public void init_genrand(uint Seed) 35 | { 36 | #if CALCULATE_ULONG 37 | SeedNow = (ulong)Seed; 38 | #else 39 | SeedNow = Seed; 40 | #endif 41 | } 42 | 43 | public uint genrand_uint32() 44 | { 45 | #if CALCULATE_ULONG 46 | SeedNow = (SeedNow ^ (SeedNow << 13)) & 0x00000000ffffffffUL; 47 | SeedNow = (SeedNow ^ (SeedNow >> 17)) & 0x00000000ffffffffUL; 48 | SeedNow = (SeedNow ^ (SeedNow << 15)) & 0x00000000ffffffffUL; 49 | return((uint)(SeedNow & 0x00000000ffffffffUL)); 50 | #else 51 | SeedNow = SeedNow ^ (SeedNow << 13); 52 | SeedNow = SeedNow ^ (SeedNow >> 17); 53 | SeedNow = SeedNow ^ (SeedNow << 15); 54 | return(SeedNow); 55 | #endif 56 | } 57 | 58 | public float genrand_float32() 59 | { 60 | return((float)((genrand_uint32() >> 9) & 0x007fffff) * (1.0f / 8388607.0f)); 61 | } 62 | 63 | /* generates a random floating point number on [0,1] */ 64 | public double genrand_real1() 65 | { 66 | return(genrand_uint32() * (1.0 / 4294967295.0)); /* divided by 2^32-1 */ 67 | } 68 | 69 | /* generates a random floating point number on [0,1] */ 70 | public double genrand_real2() 71 | { 72 | return(genrand_uint32() * (1.0 / 4294967296.0)); /* divided by 2^32 */ 73 | } 74 | 75 | /* generates a random integer number from 0 to N-1 */ 76 | public int genrand_N(int iN) 77 | { 78 | return((int)(genrand_uint32() * (iN / 4294967296.0))); 79 | } 80 | 81 | /* Interfaces */ 82 | public uint[] ListSeed 83 | { 84 | get 85 | { 86 | return(null); 87 | } 88 | } 89 | public void InitSeed(uint Seed) 90 | { 91 | init_genrand(Seed); 92 | } 93 | public uint RandomUint32() 94 | { 95 | return(genrand_uint32()); 96 | } 97 | public double RandomDouble(double Limit) 98 | { 99 | return((genrand_uint32() * (Limit / 4294967296.0))); 100 | } 101 | public float RandomFloat(float Limit) 102 | { 103 | return((float)(genrand_uint32() * (Limit / 4294967296.0f))); /* 8388607.0f */ 104 | } 105 | public int RandomN(int Limit) 106 | { 107 | return(genrand_N(Limit)); 108 | } 109 | } 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Parts.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | public static partial class Library_SpriteStudio 10 | { 11 | public static partial class Utility 12 | { 13 | public static partial class Parts 14 | { 15 | /* ******************************************************** */ 16 | //! Get Camera 17 | /*! 18 | @param InstanceGameObject 19 | GameObject to start the search 20 | @retval Return-Value 21 | Instance of Camera
22 | null == Not-Found / Failure 23 | 24 | Get Camera by examining "InstanceGameObject" and parents. 25 | */ 26 | public static Camera CameraGetParent(GameObject InstanceGameObject) 27 | { 28 | Transform InstanceTransform = InstanceGameObject.transform; 29 | Camera InstanceCamera = null; 30 | while(null != InstanceTransform) 31 | { 32 | InstanceCamera = InstanceTransform.gameObject.GetComponent(); 33 | if(null != InstanceCamera) 34 | { 35 | break; 36 | } 37 | InstanceTransform = InstanceTransform.parent; 38 | } 39 | return(InstanceCamera); 40 | } 41 | 42 | /* ******************************************************** */ 43 | //! Get Manager-Draw 44 | /*! 45 | @param InstanceGameObject 46 | GameObject to start the search 47 | @retval Return-Value 48 | Instance of "Script_SpriteStudio_ManagerDraw"
49 | null == Not-Found / Failure 50 | 51 | Get "Script_SpriteStudio_ManagerDraw" by examining "InstanceGameObject" and parents. 52 | */ 53 | public static Script_SpriteStudio_ManagerDraw ManagerDrawGetParent(GameObject InstanceGameObject) 54 | { 55 | Transform InstanceTransform = InstanceGameObject.transform; 56 | Script_SpriteStudio_ManagerDraw InstanceManagerDraw = null; 57 | while(null != InstanceTransform) 58 | { 59 | InstanceManagerDraw = InstanceTransform.gameObject.GetComponent(); 60 | if(null != InstanceManagerDraw) 61 | { 62 | break; 63 | } 64 | InstanceTransform = InstanceTransform.parent; 65 | } 66 | return(InstanceManagerDraw); 67 | } 68 | 69 | /* ******************************************************** */ 70 | //! Get Root-Parts 71 | /*! 72 | @param InstanceGameObject 73 | GameObject to start the search 74 | @retval Return-Value 75 | Instance of "Script_SpriteStudio_Root"
76 | null == Not-Found / Failure 77 | 78 | Get "Script_SpriteStudio_Root" by examining "InstanceGameObject" and direct children. 79 | */ 80 | public static Script_SpriteStudio_Root RootGetChild(GameObject InstanceGameObject) 81 | { 82 | Script_SpriteStudio_Root ScriptRoot = null; 83 | 84 | /* Check Origin */ 85 | ScriptRoot = InstanceGameObject.GetComponent(); 86 | if(null != ScriptRoot) 87 | { /* Has Root-Parts */ 88 | return(ScriptRoot); 89 | } 90 | 91 | /* Check Children */ 92 | int CountChild = InstanceGameObject.transform.childCount; 93 | Transform InstanceTransformChild = null; 94 | for(int i=0; i(); 98 | if(null != ScriptRoot) 99 | { /* Has Root-Parts */ 100 | return(ScriptRoot); 101 | } 102 | } 103 | 104 | return(null); 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_ManagerDraw.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System.Collections; 10 | 11 | [CustomEditor(typeof(Script_SpriteStudio_ManagerDraw))] 12 | public class Inspector_SpriteStudio_ManagerDraw : Editor 13 | { 14 | private static readonly string[] NameDrawKind = 15 | { 16 | "Shader Setting (Initial)", 17 | "User Setting", 18 | "Back Ground", 19 | "Geometry", 20 | "Alpha Test", 21 | "Transparent", 22 | "Overlay", 23 | // "(TERMINATOR)" 24 | }; 25 | 26 | private static bool FoldOutCameraTarget; 27 | private static bool FoldOutDrawSetting; 28 | 29 | public override void OnInspectorGUI() 30 | { 31 | Script_SpriteStudio_ManagerDraw Data = (Script_SpriteStudio_ManagerDraw)target; 32 | 33 | EditorGUILayout.LabelField("[SpriteStudio Manager-Draw]"); 34 | int LevelIndent = 0; 35 | 36 | EditorGUILayout.Space(); 37 | Data.CameraTarget = EditorGUILayout.ObjectField("Camera", Data.CameraTarget, typeof(Camera), true) as Camera; 38 | EditorGUILayout.LabelField("- Objects to be drawn (Has \"Script_SpriteStudio_PartsRoot\")"); 39 | EditorGUILayout.LabelField(" are Z-sort based on of this camera."); 40 | 41 | EditorGUILayout.Space(); 42 | Data.FlagDelayFrame = EditorGUILayout.Toggle("Delay 1 Cycle", Data.FlagDelayFrame); 43 | EditorGUILayout.LabelField(" Checked: A reflection of drawing is 1 cycle late."); 44 | EditorGUILayout.LabelField(" Unchecked: Not delay."); 45 | 46 | EditorGUILayout.Space(); 47 | FoldOutCameraTarget = EditorGUILayout.Foldout(FoldOutCameraTarget, "\"Camera\" Setting"); 48 | if(true == FoldOutCameraTarget) 49 | { 50 | EditorGUI.indentLevel = LevelIndent + 1; 51 | 52 | if(true == GUILayout.Button("Set \"Automatically Finding-Camera\"")) 53 | { 54 | Data.CameraTarget = null; 55 | } 56 | EditorGUILayout.LabelField("- When you press this button, \"View (Camera)\" is set"); 57 | EditorGUILayout.LabelField(" \"automatically scanning parent-GameObjects"); 58 | EditorGUILayout.LabelField(" that have Camera-Component\"."); 59 | } 60 | EditorGUI.indentLevel = LevelIndent; 61 | 62 | EditorGUILayout.Space(); 63 | FoldOutDrawSetting = EditorGUILayout.Foldout(FoldOutDrawSetting, "Rendering Setting"); 64 | if(true == FoldOutDrawSetting) 65 | { 66 | EditorGUI.indentLevel = LevelIndent + 1; 67 | 68 | EditorGUILayout.LabelField("Caution:"); 69 | EditorGUILayout.LabelField(" This setting does not currently effect."); 70 | EditorGUILayout.LabelField(" Scheduled obsolete function in Ver.1.3.x."); 71 | EditorGUILayout.Space(); 72 | 73 | int CountKindQueue = (int)Library_SpriteStudio.ManagerDraw.KindDrawQueue.OVERLAY + 1; 74 | int[] IndexDrawKind = new int[CountKindQueue]; 75 | for(int i=0; i(); 57 | } 58 | if(null == InstanceMeshRenderer) 59 | { 60 | InstanceMeshRenderer = gameObject.GetComponent(); 61 | } 62 | 63 | /* Draw-Object Buffer Create */ 64 | if(null == ChainDrawObject) 65 | { 66 | ChainDrawObject = new Library_SpriteStudio.ManagerDraw.TerminalDrawObject(); 67 | } 68 | ChainDrawObject.ChainCleanUp(); 69 | } 70 | 71 | void LateUpdate() 72 | { 73 | /* Draw-Object Buffer Create */ 74 | if(null != ChainDrawObject) 75 | { 76 | /* Draw-Object Sort */ 77 | ChainDrawObject.DrawObjectSort(InstanceCamera); /* InstanceCamera, InstanceView */ 78 | 79 | /* Combined-Mesh Create */ 80 | if((null != InstanceMeshFilter) && (null != InstanceMeshRenderer)) 81 | { 82 | /* DrawParts-Cluster Create */ 83 | if(null == ChainClusterDrawParts) 84 | { 85 | ChainClusterDrawParts = new Library_SpriteStudio.ManagerDraw.TerminalClusterDrawParts(); 86 | ChainClusterDrawParts.BootUp(0); /* ManagerDraw has No-Cluster for "Draw" */ 87 | } 88 | ChainDrawObject.ClusterConstruct(ChainClusterDrawParts); 89 | 90 | /* Cluster-Chain Fix (Collect Sub-Clusters & Optimize) */ 91 | Library_SpriteStudio.ManagerDraw.ClusterFix(ChainClusterDrawParts); 92 | 93 | /* Meshes Combine */ 94 | int IndexParameterMeshWrite = IndexParameterMesh; 95 | int IndexParameterMeshDraw = (true == FlagDelayFrame) ? ((IndexParameterMesh + 1) % (int)Library_SpriteStudio.ManagerDraw.Constant.MAX_MESHPARAMETERBUFFER) : IndexParameterMesh; 96 | if(null == InstanceMesh) 97 | { 98 | CreateInstanceMesh((int)(int)Library_SpriteStudio.ManagerDraw.Constant.MAX_MESHPARAMETERBUFFER); 99 | } 100 | if(null == InstanceMaterial) 101 | { 102 | CreateInstanceMaterial((int)(int)Library_SpriteStudio.ManagerDraw.Constant.MAX_MESHPARAMETERBUFFER); 103 | } 104 | Library_SpriteStudio.ManagerDraw.MeshCreate( ChainClusterDrawParts, 105 | ref InstanceMesh[IndexParameterMeshWrite], 106 | ref InstanceMaterial[IndexParameterMeshWrite], 107 | ref InstanceMesh[IndexParameterMeshDraw], 108 | ref InstanceMaterial[IndexParameterMeshDraw], 109 | InstanceMeshRenderer, 110 | InstanceMeshFilter, 111 | InstanceTransform, 112 | InstanceCamera 113 | ); 114 | IndexParameterMesh++; 115 | IndexParameterMesh %= (int)Library_SpriteStudio.ManagerDraw.Constant.MAX_MESHPARAMETERBUFFER; 116 | } 117 | 118 | /* Draw-Object Clear */ 119 | ChainDrawObject.ChainCleanUp(); 120 | } 121 | } 122 | 123 | private bool CreateInstanceMesh(int CountBuffer) 124 | { 125 | InstanceMesh = new Mesh[CountBuffer]; 126 | for(int i=0; i 152 | (This function is for Internal-Processing) 153 | */ 154 | public void DrawSet(Library_SpriteStudio.Script.Root InstanceRoot) 155 | { 156 | if(null != ChainDrawObject) 157 | { 158 | /* MEMO: Sort execute after all Draw-Objects are set. */ 159 | InstanceRoot.DrawObject.Data.InstanceRoot = InstanceRoot; 160 | ChainDrawObject.ChainAddForce(InstanceRoot.DrawObject); 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_RootEffect.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System.Collections; 10 | 11 | [CustomEditor(typeof(Script_SpriteStudio_RootEffect))] 12 | public class Inspector_SpriteStudio_RootEffect : Editor 13 | { 14 | private static bool FoldOutStaticDatas; 15 | private static bool FoldOutMaterialTable; 16 | private static bool FoldOutMaterialApplied; 17 | private static bool FoldOutPlayInformation; 18 | 19 | private static readonly string[][] ListNameShader = new string[(int)Library_SpriteStudio.KindColorOperationEffect.TERMINATOR_KIND - 1][] 20 | { 21 | new string[] { "MIX", 22 | }, 23 | new string[] { "ADD (PreMultiplied Alpha)", 24 | "ADD2 (Straight Alpha)", 25 | }, 26 | }; 27 | private static readonly int[][] ListIndexOffsetShader = new int[(int)Library_SpriteStudio.KindColorOperationEffect.TERMINATOR_KIND - 1][] 28 | { 29 | new int[] { (int)(Library_SpriteStudio.KindColorOperationEffect.MIX - Library_SpriteStudio.KindColorOperationEffect.MIX), 30 | }, 31 | new int[] { (int)(Library_SpriteStudio.KindColorOperationEffect.ADD - Library_SpriteStudio.KindColorOperationEffect.ADD), 32 | (int)(Library_SpriteStudio.KindColorOperationEffect.ADD2 - (int)Library_SpriteStudio.KindColorOperationEffect.ADD), 33 | }, 34 | }; 35 | 36 | public override void OnInspectorGUI() 37 | { 38 | Script_SpriteStudio_RootEffect Data = (Script_SpriteStudio_RootEffect)target; 39 | 40 | EditorGUILayout.LabelField("[SpriteStudio Root-Effect]"); 41 | int LevelIndent = 0; 42 | 43 | EditorGUILayout.Space(); 44 | Data.InstanceManagerDraw = (Script_SpriteStudio_ManagerDraw)(EditorGUILayout.ObjectField("View (Manager-Draw)", Data.InstanceManagerDraw, typeof(Script_SpriteStudio_ManagerDraw), true)); 45 | 46 | EditorGUILayout.Space(); 47 | FoldOutStaticDatas = EditorGUILayout.Foldout(FoldOutStaticDatas, "Static Datas"); 48 | if(true == FoldOutStaticDatas) 49 | { 50 | EditorGUI.indentLevel = LevelIndent + 1; 51 | Data.DataCellMap = (Script_SpriteStudio_DataCell)(EditorGUILayout.ObjectField("Data:CellMap", Data.DataCellMap, typeof(Script_SpriteStudio_DataCell), true)); 52 | Data.DataEffect = (Script_SpriteStudio_DataEffect)(EditorGUILayout.ObjectField("Data:Effect", Data.DataEffect, typeof(Script_SpriteStudio_DataEffect), true)); 53 | EditorGUI.indentLevel = LevelIndent; 54 | } 55 | 56 | EditorGUILayout.Space(); 57 | FoldOutMaterialTable = EditorGUILayout.Foldout(FoldOutMaterialTable, "Based-Material Table"); 58 | if(true == FoldOutMaterialTable) 59 | { 60 | EditorGUI.indentLevel = LevelIndent + 1; 61 | if(null != Data.TableMaterial) 62 | { 63 | int CountShader = (int)(Library_SpriteStudio.KindColorOperationEffect.TERMINATOR - 1); 64 | int Count = Data.TableMaterial.Length / CountShader; 65 | int MaterialNoTop = 0; 66 | Library_SpriteStudio.KindColorOperationEffect MaterialTableNo = 0; 67 | string NameField = ""; 68 | for(int i=0; i= Data.IndexMaterialBlendOffset.Length)) 98 | { 99 | Data.TableCreateBlendOffset(); 100 | } 101 | 102 | int CountBlendKind = (int)(Library_SpriteStudio.KindColorOperationEffect.TERMINATOR_KIND - 1); 103 | for(int i=0; i CountLimitParticle) 123 | { 124 | CountLimitParticle = -1; 125 | } 126 | } 127 | if(CountLimitParticle != Data.CountLimitParticleInitial) 128 | { 129 | Data.CountLimitParticleInitial = CountLimitParticle; 130 | } 131 | 132 | EditorGUI.indentLevel = LevelIndent; 133 | } 134 | 135 | if(true == GUI.changed) 136 | { 137 | EditorUtility.SetDirty(target); 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/Random/MersenneTwister.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura. 3 | 4 | This source-list (C# porting and customizing) is coded by 5 | Web Technology Corp. 2015 November 2, 2015. 6 | 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | THE SOFTWARE. 29 | */ 30 | using UnityEngine; 31 | 32 | public static partial class Library_SpriteStudio 33 | { 34 | public static partial class Utility 35 | { 36 | public static partial class Random 37 | { 38 | public class MersenneTwister : Library_SpriteStudio.Utility.Random.Generator 39 | { 40 | /* Seed for Emitter */ 41 | private static readonly uint[] ListSeedEffect = new uint[] 42 | { 43 | 485, 583, 814, 907, 1311, 1901, 2236, 3051, 3676, 4338, 44 | 4671, 4775, 4928, 4960, 5228, 5591, 5755, 5825, 5885, 5967, 6014, 6056, 45 | 6399, 6938, 7553, 8280, 8510, 8641, 8893, 9043, 31043, 31043, 46 | }; 47 | 48 | private enum Constants : ulong 49 | { 50 | iN = 624UL, /* int */ 51 | iM = 397UL, /* int */ 52 | ulMATRIX_A = 0x9908b0dfUL, 53 | ulUPPER_MASK = 0x80000000UL, 54 | ulLOWER_MASK = 0x7fffffffUL, 55 | } 56 | private ulong[] m_aulMT; 57 | private int m_iMTI; 58 | 59 | public MersenneTwister() 60 | { 61 | m_aulMT = new ulong[(int)Constants.iN]; 62 | m_iMTI = (int)Constants.iN + 1; /* mti==N+1 means mt[N] is not initialized */ 63 | ulong[] auInit = 64 | { 65 | 0x123UL, 66 | 0x234UL, 67 | 0x345UL, 68 | 0x456UL 69 | }; 70 | init_by_array(auInit, auInit.Length); /* use default seed */ 71 | } 72 | 73 | /* initializes mt[N] with a seed */ 74 | public void init_genrand(ulong ulSeed) 75 | { 76 | m_aulMT[0] = ulSeed & 0xffffffffUL; 77 | { 78 | for(m_iMTI=1; m_iMTI<(int)Constants.iN; m_iMTI++) 79 | { 80 | m_aulMT[m_iMTI] = (uint)((1812433253UL * (m_aulMT[m_iMTI - 1] ^ (m_aulMT[m_iMTI - 1] >> 30)) + (ulong)m_iMTI)); 81 | /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ 82 | /* In the previous versions, MSBs of the seed affect */ 83 | /* only MSBs of the array mt[]. */ 84 | /* 2002/01/09 modified by Makoto Matsumoto */ 85 | m_aulMT[m_iMTI] &= 0xffffffffUL; /* for >32 bit machines */ 86 | } 87 | } 88 | } 89 | 90 | /* initialize by an array with array-length */ 91 | /* init_key is the array for initializing keys */ 92 | /* key_length is its length */ 93 | public void init_by_array(ulong[] aulInitKey, int iKeyLength) 94 | { 95 | init_genrand(19650218UL); 96 | int iI = 1; 97 | int iJ = 0; 98 | { 99 | for(int k=(((int)Constants.iN > iKeyLength) ? (int)Constants.iN : iKeyLength); k>0; k--) 100 | { 101 | m_aulMT[iI] = ((m_aulMT[iI] ^ ((m_aulMT[iI - 1] ^ (m_aulMT[iI - 1] >> 30)) * 1664525UL)) + aulInitKey[iJ] + (ulong)iJ); /* non linear */ 102 | m_aulMT[iI] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ 103 | iI++; 104 | iJ++; 105 | if(iI >= (int)Constants.iN) 106 | { 107 | m_aulMT[0] = m_aulMT[(int)Constants.iN - 1]; 108 | iI = 1; 109 | } 110 | if(iJ >= iKeyLength) 111 | { 112 | iJ = 0; 113 | } 114 | } 115 | } 116 | { 117 | for(int k=(int)Constants.iN - 1; k>0; k--) 118 | { 119 | m_aulMT[iI] = (uint)((m_aulMT[iI] ^ ((m_aulMT[iI - 1] ^ (m_aulMT[iI - 1] >> 30)) * 1566083941UL)) - (ulong)iI); /* non linear */ 120 | m_aulMT[iI] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ 121 | iI++; 122 | if(iI >= (int)Constants.iN) 123 | { 124 | m_aulMT[0] = m_aulMT[(int)Constants.iN - 1]; 125 | iI = 1; 126 | } 127 | } 128 | } 129 | m_aulMT[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */ 130 | } 131 | 132 | /* generates a random number on [0,0xffffffff]-interval */ 133 | public uint genrand_uint32() 134 | { 135 | ulong[] aulMag01 = 136 | { 137 | 0, 138 | (ulong)Constants.ulMATRIX_A 139 | }; 140 | ulong ulY = 0; 141 | 142 | /* mag01[x] = x * MATRIX_A for x=0,1 */ 143 | if(m_iMTI >= (int)Constants.iN) 144 | { 145 | /* generate N words at one time */ 146 | if (m_iMTI == ((int)Constants.iN + 1)) 147 | { 148 | /* if init_genrand() has not been called, */ 149 | init_genrand(5489UL); /* a default initial seed is used */ 150 | } 151 | int iKK = 0; 152 | { 153 | for(; iKK<((int)Constants.iN - (int)Constants.iM); iKK++) 154 | { 155 | ulY = (m_aulMT[iKK] & (ulong)Constants.ulUPPER_MASK) | (m_aulMT[iKK + 1] & (ulong)Constants.ulLOWER_MASK); 156 | m_aulMT[iKK] = m_aulMT[iKK + (int)Constants.iM] ^ (ulY >> 1) ^ aulMag01[ulY & 1]; 157 | } 158 | } 159 | { 160 | for (; iKK <((int)Constants.iN - 1); iKK++) 161 | { 162 | ulY = (m_aulMT[iKK] & (ulong)Constants.ulUPPER_MASK) | (m_aulMT[iKK + 1] & (ulong)Constants.ulLOWER_MASK); 163 | m_aulMT[iKK] = m_aulMT[iKK + ((int)Constants.iM - (int)Constants.iN)] ^ (ulY >> 1) ^ aulMag01[ulY & 0x1UL]; 164 | } 165 | } 166 | 167 | ulY = (m_aulMT[(int)Constants.iN - 1] & (ulong)Constants.ulUPPER_MASK) | (m_aulMT[0] & (ulong)Constants.ulLOWER_MASK); 168 | m_aulMT[(int)Constants.iN - 1] = m_aulMT[(int)Constants.iM - 1] ^ (ulY >> 1) ^ aulMag01[ulY & 1]; 169 | m_iMTI = 0; 170 | } 171 | 172 | ulY = m_aulMT[m_iMTI++]; 173 | /* Tempering */ 174 | ulY ^= (ulY >> 11); 175 | ulY ^= (ulY << 7) & 0x9d2c5680UL; 176 | ulY ^= (ulY << 15) & 0xefc60000UL; 177 | ulY ^= (ulY >> 18); 178 | return((uint)(ulY & 0xffffffffUL)); 179 | } 180 | 181 | /* generates a random floating point number on [0,1] */ 182 | public double genrand_real1() 183 | { 184 | return genrand_uint32() * (1.0 / 4294967295.0); /* divided by 2^32-1 */ 185 | } 186 | 187 | /* generates a random floating point number on [0,1] */ 188 | public double genrand_real2() 189 | { 190 | return genrand_uint32() * (1.0 / 4294967296.0); /* divided by 2^32 */ 191 | } 192 | 193 | /* generates a random integer number from 0 to N-1 */ 194 | public int genrand_N(int iN) 195 | { 196 | return (int)(genrand_uint32() * (iN / 4294967296.0)); 197 | } 198 | 199 | /* Interfaces */ 200 | public uint[] ListSeed 201 | { 202 | get 203 | { 204 | return(ListSeedEffect); 205 | } 206 | } 207 | public void InitSeed(uint Seed) 208 | { 209 | if(0xffffffff != Seed) 210 | { /* Seed Set */ 211 | uint[] TableSeed = ListSeed; 212 | if(Seed < TableSeed.Length) 213 | { 214 | init_genrand(TableSeed[Seed]); 215 | } 216 | else 217 | { 218 | init_genrand(Seed); 219 | } 220 | } 221 | } 222 | public uint RandomUint32() 223 | { 224 | return(genrand_uint32()); 225 | } 226 | public double RandomDouble(double Limit) 227 | { 228 | return((genrand_uint32() * (Limit / 4294967296.0))); 229 | } 230 | public float RandomFloat(float Limit) 231 | { 232 | return((float)(genrand_uint32() * (Limit / 4294967296.0f))); 233 | } 234 | public int RandomN(int Limit) 235 | { 236 | return(genrand_N(Limit)); 237 | } 238 | } 239 | } 240 | } 241 | } 242 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Pack/Flyweight.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System.Collections.Generic; 10 | 11 | public static partial class Library_SpriteStudio 12 | { 13 | public static partial class Data 14 | { 15 | public static partial class Pack 16 | { 17 | public static partial class Flyweight 18 | { 19 | [System.Serializable] 20 | public class Factory 21 | { 22 | [SerializeField] 23 | List vector2s = new List(); 24 | public List Vector2s 25 | { 26 | get 27 | { 28 | return vector2s; 29 | } 30 | } 31 | 32 | [SerializeField] 33 | List coordinateMeshFixes = new List(); 34 | public List CoordinateMeshFixes 35 | { 36 | get 37 | { 38 | return coordinateMeshFixes; 39 | } 40 | } 41 | 42 | [SerializeField] 43 | List colorMeshFixes = new List(); 44 | public List ColorMeshFixes 45 | { 46 | get 47 | { 48 | return colorMeshFixes; 49 | } 50 | } 51 | 52 | [SerializeField] 53 | List uvMeshFixes = new List(); 54 | public List UVMeshFixes 55 | { 56 | get 57 | { 58 | return uvMeshFixes; 59 | } 60 | } 61 | } 62 | 63 | public abstract class ListAttribute_Base<_TypeValue> 64 | { 65 | [System.Flags] 66 | public enum FlagBit : int 67 | { 68 | FRAMENO = 0x00007fff, 69 | INDEX = 0x3fff8000, 70 | 71 | CLEAR = 0x00000000, 72 | } 73 | 74 | [SerializeField] 75 | FlagBit[] ListStatus; 76 | 77 | abstract public _TypeValue GetValue(Factory flyweight, int index); 78 | abstract protected int Add(Factory flyweight, _TypeValue value); 79 | 80 | public Library_SpriteStudio.KindPack KindPack 81 | { 82 | get 83 | { 84 | return(Library_SpriteStudio.KindPack.FLYWEIGHT); 85 | } 86 | } 87 | 88 | public bool IsValid 89 | { 90 | get 91 | { 92 | return (ListStatus != null && ListStatus.Length > 0); 93 | } 94 | } 95 | 96 | static FlagBit GetFlagBit(int FrameNo, int IndexData) 97 | { 98 | FlagBit FlagBitNow = ((FlagBit)FrameNo) & FlagBit.FRAMENO; 99 | FlagBitNow |= ((FlagBit)(IndexData << 15)) & FlagBit.INDEX; 100 | return (FlagBitNow); 101 | } 102 | 103 | public bool TryGetValue(out _TypeValue value, int FrameNo, Factory flyweight) 104 | { 105 | int FrameNoOrigin; 106 | int index = IndexGetValue(out FrameNoOrigin, FrameNo); 107 | if (index < 0) 108 | { 109 | value = default(_TypeValue); 110 | return false; 111 | } 112 | value = GetValue(flyweight, index); 113 | return true; 114 | } 115 | 116 | public int IndexGetValue(out int FrameNoOrigin, int FrameNo) 117 | { 118 | int Index = -1; 119 | int FrameNoKey = -1; 120 | 121 | if (ListStatus == null || 0 >= ListStatus.Length) 122 | { /* MEMO: Uncompressed or No-Data */ 123 | goto IndexGetValue_End; 124 | } 125 | 126 | FlagBit StatusTemp; 127 | int Min = 0; 128 | int Max = ListStatus.Length - 1; 129 | int Middle; 130 | int Range; 131 | while (Min != Max) 132 | { 133 | Range = Min + Max; 134 | Middle = (Range / 2) + (Range % 2); 135 | StatusTemp = ListStatus[Middle] & FlagBit.FRAMENO; 136 | FrameNoKey = (FlagBit.FRAMENO == StatusTemp) ? -1 : (int)StatusTemp; 137 | if (FrameNo == FrameNoKey) 138 | { 139 | Min = Middle; 140 | Max = Middle; 141 | } 142 | else 143 | { 144 | if ((FrameNo < FrameNoKey) || (-1 == FrameNoKey)) 145 | { 146 | Max = Middle - 1; 147 | } 148 | else 149 | { 150 | Min = Middle; 151 | } 152 | } 153 | } 154 | 155 | StatusTemp = ListStatus[Min]; 156 | FlagBit ValueTemp = StatusTemp & FlagBit.FRAMENO; 157 | FrameNoKey = (FlagBit.FRAMENO == ValueTemp) ? -1 : (int)ValueTemp; 158 | ValueTemp = StatusTemp & FlagBit.INDEX; 159 | Index = (FlagBit.INDEX == ValueTemp) ? -1 : ((int)ValueTemp >> 15); 160 | 161 | IndexGetValue_End:; 162 | FrameNoOrigin = FrameNoKey; 163 | return (Index); 164 | } 165 | 166 | public void Build(Factory flyweight, _TypeValue[] rawValues) 167 | { 168 | if (rawValues == null || rawValues.Length == 0) 169 | { /* No-Data */ 170 | ListStatus = new FlagBit[0]; 171 | return; 172 | } 173 | 174 | /* WorkArea Boot-Up */ 175 | List ArrayFrameNo = new List(); 176 | List ArrayIndex = new List(); 177 | 178 | /* Extructing Changing Point */ 179 | for (int i = 0; i < rawValues.Length; i++) 180 | { 181 | if (i > 0 182 | && rawValues[i].Equals(rawValues[i - 1])) 183 | { /* Unchanging */ 184 | continue; 185 | } 186 | 187 | var IndexExist = Add(flyweight, rawValues[i]); 188 | ArrayFrameNo.Add(i); 189 | ArrayIndex.Add(IndexExist); 190 | } 191 | 192 | ListStatus = new FlagBit[ArrayIndex.Count]; 193 | for (int i = 0; i < ListStatus.Length; i++) 194 | { 195 | ListStatus[i] = GetFlagBit((int)ArrayFrameNo[i], (int)ArrayIndex[i]); 196 | } 197 | 198 | return; 199 | } 200 | } 201 | 202 | /* ------------------------------------------------------------ Attribute-List */ 203 | [System.Serializable] 204 | public class ListAttributeVector2 : ListAttribute_Base 205 | { 206 | override public Vector2 GetValue(Factory flyweight, int index) 207 | { 208 | return flyweight.Vector2s[index]; 209 | } 210 | protected override int Add(Factory flyweight, Vector2 value) 211 | { 212 | int i = flyweight.Vector2s.IndexOf(value); 213 | if (i >= 0) 214 | { 215 | return i; 216 | } 217 | else 218 | { 219 | flyweight.Vector2s.Add(value); 220 | return flyweight.Vector2s.Count - 1; 221 | } 222 | } 223 | } 224 | 225 | [System.Serializable] 226 | public class ListAttributeCoordinateMeshFix : ListAttribute_Base 227 | { 228 | override public Library_SpriteStudio.Data.AttributeCoordinateMeshFix GetValue(Factory flyweight, int index) 229 | { 230 | return flyweight.CoordinateMeshFixes[index]; 231 | } 232 | protected override int Add(Factory flyweight, Library_SpriteStudio.Data.AttributeCoordinateMeshFix value) 233 | { 234 | int i = flyweight.CoordinateMeshFixes.FindIndex(_ => _.Equals(value)); 235 | if (i >= 0) 236 | { 237 | return i; 238 | } 239 | else 240 | { 241 | flyweight.CoordinateMeshFixes.Add(value); 242 | return flyweight.CoordinateMeshFixes.Count - 1; 243 | } 244 | } 245 | } 246 | 247 | [System.Serializable] 248 | public class ListAttributeColorBlendMeshFix : ListAttribute_Base 249 | { 250 | override public Library_SpriteStudio.Data.AttributeColorBlendMeshFix GetValue(Factory flyweight, int index) 251 | { 252 | return flyweight.ColorMeshFixes[index]; 253 | } 254 | protected override int Add(Factory flyweight, Library_SpriteStudio.Data.AttributeColorBlendMeshFix value) 255 | { 256 | int i = flyweight.ColorMeshFixes.FindIndex(_ => _.Equals(value)); 257 | if (i >= 0) 258 | { 259 | return i; 260 | } 261 | else 262 | { 263 | flyweight.ColorMeshFixes.Add(value); 264 | return flyweight.ColorMeshFixes.Count - 1; 265 | } 266 | } 267 | } 268 | 269 | [System.Serializable] 270 | public class ListAttributeUVMeshFix : ListAttribute_Base 271 | { 272 | override public Library_SpriteStudio.Data.AttributeUVMeshFix GetValue(Factory flyweight, int index) 273 | { 274 | return flyweight.UVMeshFixes[index]; 275 | } 276 | protected override int Add(Factory flyweight, Library_SpriteStudio.Data.AttributeUVMeshFix value) 277 | { 278 | int i = flyweight.UVMeshFixes.FindIndex(_ => _.Equals(value)); 279 | if (i >= 0) 280 | { 281 | return i; 282 | } 283 | else 284 | { 285 | flyweight.UVMeshFixes.Add(value); 286 | return flyweight.UVMeshFixes.Count - 1; 287 | } 288 | } 289 | } 290 | } 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Pack/Standard.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System.Collections.Generic; 10 | 11 | public static partial class Library_SpriteStudio 12 | { 13 | public static partial class Data 14 | { 15 | public static partial class Pack 16 | { 17 | public static partial class Standard 18 | { 19 | public class ListAttribute_Base<_TypeValue> 20 | { 21 | [System.Flags] 22 | public enum FlagBit : int 23 | { 24 | FRAMENO = 0x00007fff, 25 | INDEX = 0x3fff8000, 26 | 27 | CLEAR = 0x00000000, 28 | } 29 | 30 | public FlagBit[] ListStatus; 31 | public _TypeValue[] ListValue; 32 | 33 | public Library_SpriteStudio.KindPack KindPack 34 | { 35 | get 36 | { 37 | return((0 >= ListStatus.Length) ? Library_SpriteStudio.KindPack.STANDARD_UNCOMPRESSED : Library_SpriteStudio.KindPack.STANDARD_CPE); 38 | } 39 | } 40 | 41 | public bool IsValid 42 | { 43 | get 44 | { 45 | return(0 < ListValue.Length); 46 | } 47 | } 48 | 49 | public void CleanUp() 50 | { 51 | ListStatus = null; 52 | ListValue = null; 53 | } 54 | 55 | public void BootUp(int CountFrame) 56 | { /* MEMO: FrameCount==0 ... No-Data *//* MEMO: Always Uncompressed */ 57 | ListStatus = new FlagBit[0]; 58 | ListValue = new _TypeValue[CountFrame]; 59 | } 60 | 61 | public void BootUpCompressedForce(int CountData) 62 | { /* MEMO: Always Uncompressed */ 63 | ListStatus = new FlagBit[CountData]; 64 | ListValue = new _TypeValue[CountData]; 65 | for(int i=0; i> 15)); 83 | } 84 | 85 | public int IndexGetValue(out int FrameNoOrigin, int FrameNo) 86 | { 87 | int Index = -1; 88 | int FrameNoKey = -1; 89 | 90 | if(0 >= ListStatus.Length) 91 | { /* MEMO: Uncompressed or No-Data */ 92 | if(0 >= ListValue.Length) 93 | { /* MEMO: No-Data */ 94 | goto IndexGetValue_End; 95 | } 96 | 97 | FrameNoKey = FrameNo; 98 | Index = FrameNo; 99 | goto IndexGetValue_End; 100 | } 101 | 102 | FlagBit StatusTemp; 103 | int Min = 0; 104 | int Max = ListStatus.Length - 1; 105 | int Medium; 106 | int Range; 107 | while(Min != Max) 108 | { 109 | Range = Min + Max; 110 | Medium = (Range / 2) + (Range % 2); 111 | StatusTemp = ListStatus[Medium] & FlagBit.FRAMENO; 112 | FrameNoKey = (FlagBit.FRAMENO == StatusTemp) ? -1 : (int)StatusTemp; 113 | if(FrameNo == FrameNoKey) 114 | { 115 | Min = Medium; 116 | Max = Medium; 117 | } 118 | else 119 | { 120 | if((FrameNo < FrameNoKey) || (-1 == FrameNoKey)) 121 | { 122 | Max = Medium - 1; 123 | } 124 | else 125 | { 126 | Min = Medium; 127 | } 128 | } 129 | } 130 | 131 | StatusTemp = ListStatus[Min]; 132 | FlagBit ValueTemp = StatusTemp & FlagBit.FRAMENO; 133 | FrameNoKey = (FlagBit.FRAMENO == ValueTemp) ? -1 : (int)ValueTemp; 134 | ValueTemp = StatusTemp & FlagBit.INDEX; 135 | Index = (FlagBit.INDEX == ValueTemp) ? -1 : ((int)ValueTemp >> 15); 136 | 137 | IndexGetValue_End:; 138 | FrameNoOrigin = FrameNoKey; 139 | return(Index); 140 | } 141 | 142 | public bool CompressCPE(int CountFrame) 143 | { /* MEMO: CPE(Changing-Point Extracting) */ 144 | if(0 < ListStatus.Length) 145 | { /* Already Compressed */ 146 | return(true); 147 | } 148 | 149 | if(0 >= ListValue.Length) 150 | { /* No-Data */ 151 | return(true); 152 | } 153 | 154 | /* WorkArea Boot-Up */ 155 | List ArrayFrameNo = new List(); 156 | List ArrayIndex = new List(); 157 | List<_TypeValue> ArrayValue = new List<_TypeValue>(); 158 | ArrayFrameNo.Clear(); 159 | ArrayIndex.Clear(); 160 | ArrayValue.Clear(); 161 | 162 | /* Top-Data Store-Force */ 163 | ArrayFrameNo.Add(0); 164 | ArrayIndex.Add(0); 165 | ArrayValue.Add(ListValue[0]); 166 | 167 | /* Extructing Changing Point */ 168 | int Count = ListValue.Length; 169 | int CountArray = -1; 170 | int IndexExist = -1; 171 | for(int i=1; i= Count) 204 | { /* All value is Changing-Point ... Uncompress */ 205 | ListStatus = new FlagBit[0]; 206 | return(true); 207 | } 208 | ListStatus = new FlagBit[CountArray]; 209 | for(int i=0; i= ListStatus.Length) 221 | { /* Already Decompressed */ 222 | return(true); 223 | } 224 | 225 | if(0 >= ListValue.Length) 226 | { /* No Data */ 227 | return(true); 228 | } 229 | 230 | _TypeValue[] ListValueNew = new _TypeValue[CountFrame]; 231 | int Index; 232 | int FrameNoOriginDummy; 233 | for(int i=0; i 247 | { 248 | } 249 | [System.Serializable] 250 | public class ListAttributeFloat : ListAttribute_Base 251 | { 252 | } 253 | [System.Serializable] 254 | public class ListAttributeVector2 : ListAttribute_Base 255 | { 256 | } 257 | [System.Serializable] 258 | public class ListAttributeVector3 : ListAttribute_Base 259 | { 260 | } 261 | 262 | [System.Serializable] 263 | public class ListAttributeStatus : ListAttribute_Base 264 | { 265 | } 266 | [System.Serializable] 267 | public class ListAttributeColorBlend : ListAttribute_Base 268 | { 269 | } 270 | [System.Serializable] 271 | public class ListAttributeVertexCorrection : ListAttribute_Base 272 | { 273 | } 274 | [System.Serializable] 275 | public class ListAttributeCell : ListAttribute_Base 276 | { 277 | } 278 | [System.Serializable] 279 | public class ListAttributeUserData : ListAttribute_Base 280 | { 281 | } 282 | [System.Serializable] 283 | public class ListAttributeInstance : ListAttribute_Base 284 | { 285 | } 286 | [System.Serializable] 287 | public class ListAttributeEffect : ListAttribute_Base 288 | { 289 | } 290 | 291 | [System.Serializable] 292 | public class ListAttributeIndexCellMapFix : ListAttribute_Base 293 | { 294 | } 295 | } 296 | } 297 | } 298 | } 299 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Sample/BatchImport/BatchList/ListingSample.txt: -------------------------------------------------------------------------------- 1 | * ========================================== 2 | * Batch-Importing Sample List-File 3 | * ========================================== 4 | * 5 | * SpriteStudio5 Player for Unity 6 | * 7 | * Copyright(C) Web Technology Corp. 8 | * All rights reserved. 9 | * 10 | * 11 | * ------------------------------------------ 12 | * [Usage] 13 | * 14 | * The character at the beginning of the line, there are those that have a special meaning. 15 | * 16 | * "*" ... Remarks. 17 | * Lines beginning with this character, is ignored. 18 | * 19 | * "?" ... Change Import Setting. 20 | * In instruction written after this character, you can change the settings at the time of import. 21 | * You can change settings even the middle of the list . 22 | * 23 | * Blank-Line ... Blank-Line is ignored. 24 | * 25 | * Other ... InputFileName(.sspj) 26 | * 27 | * 28 | * 29 | * [Instructions] (Line that has been described is "?" at the beginning of a line) 30 | * --------------------- 31 | * NameBaseFolderAsset > AssetFolderName 32 | * AssetFolderName ... Imported datas are Base-Asset-folder. 33 | * default == Selected Folder in "Project". 34 | * 35 | * Imported datas will be stored under this Asset-Folder. 36 | * 37 | * ex: 38 | * NameBaseFolderAsset > Assets/SS5PU_Data 39 | * 40 | * --------------------- 41 | * NameBaseFolderSS5Data > FolderName 42 | * FolderName ... Reference folder of the file(sspj) you want to import. 43 | * default == "" (Empty) 44 | * 45 | * It becomes Base-Folder of files that have been described in the list. 46 | * 47 | * ex: 48 | * NameBaseFolderSS5Data > E://SS5Data 49 | * 50 | * --------------------- 51 | * FlagNameDataRuleOld > Flag 52 | * Flag ... true / false (bool) 53 | * default == true 54 | * 55 | * This is the same function as "Naming Old Rule" in the import settings. 56 | * 57 | * ex. 58 | * FlagNameDataRuleOld > false 59 | * 60 | * --------------------- 61 | * FlagNameDataAttachSpecific > Flag 62 | * Flag ... true / false (bool) 63 | * default == false 64 | * 65 | * This is the same function as "Naming Add Prefix" in the import settings. 66 | * So that the Asset-Name does not conflict when stored in the Asset-Bundle, 67 | * add the data identification string to the top. 68 | * 69 | * Each prefix is the following . 70 | * - Animation Object (Prefab) : ""=[None] 71 | * - Effect Object (Prefab) : "pe_" or ""=[none] 72 | * - Static Animation-Data : "da_" 73 | * - Static Effect-Data : "de_" 74 | * - Static CellMapData : ""=[none] (SSPJ's BodyName, force) 75 | * - Static Material-Animation : "ma_" 76 | * - Static Material-Effect : "me_" 77 | * - Static Texture : ""=[None] 78 | * 79 | * ex. 80 | * FlagNameDataAttachSpecific > false 81 | * 82 | * --------------------- 83 | * FlagNameDataAttachSpecificSSPJ > Flag 84 | * Flag ... true / false (bool) 85 | * default == false 86 | * 87 | * This is the same function as "Add SSPJ-Name" in the import settings. 88 | * When the value is "true", the prefix will change to the following. 89 | * 90 | * - Animation Object (Prefab) : "(SSPJ's BodyName)_" or ""=[None] 91 | * - Effect Object (Prefab) : "pe_(SSPJ's BodyName)_" 92 | * - Static Animation-Data : "da_(SSPJ's BodyName)_" 93 | * - Static Effect-Data : "de_(SSPJ's BodyName)_" 94 | * - Static CellMapData : ""=[None] (SSPJ's BodyName, force) 95 | * - Static Material-Animation : "ma_(SSPJ's BodyName)_" 96 | * - Static Material-Effect : "me_(SSPJ's BodyName)_" 97 | * - Static Texture : "(SSPJ's BodyName)_" or ""=[None] 98 | * 99 | * If "FlagNameDataAttachSpecific" set "false", this setting does not effect. 100 | * 101 | * ex. 102 | * FlagNameDataAttachSpecificSSPJ > true 103 | * 104 | * --------------------- 105 | * FlagNameDataAttachSpecificToPrefab > Flag 106 | * Flag ... true / false (bool) 107 | * default == false 108 | * 109 | * This is the same function as "Apply to Prefabs" in the import settings. 110 | * Append prefix to the Asset-Name for Animation-Object prefab. 111 | * 112 | * The prefix is following. 113 | * - Animation Object : ""=[None] 114 | * - Effect Object : "pe_" 115 | * 116 | * When the value of the "FlagNameDataAttachSpecificSSPJ" is "true", 117 | * the prefix will change to the following. 118 | * - Animation Object : "(SSPJ-Name)_" 119 | * - Effect Object : "pe_(SSPJ-Name)_" 120 | * 121 | * If "FlagNameDataAttachSpecific" set "false", this setting does not effect. 122 | * 123 | * ex. 124 | * FlagNameDataAttachSpecificToPrefab > false 125 | * 126 | * --------------------- 127 | * FlagNameDataAttachSpecificToTexture > Flag 128 | * Flag ... true / false (bool) 129 | * default == false 130 | * 131 | * This is the same function as "Apply to Textures" in the import settings. 132 | * Append prefix to the Asset-Name for Texture-Assets. 133 | * 134 | * The prefix is following. 135 | * - Texture : ""=[none] 136 | * 137 | * When the value of the "FlagNameDataAttachSpecificSSPJ" is "true", 138 | * the prefix will change to the following. 139 | * - Texture : "(SSPJ-Name)_"" 140 | * 141 | * If "FlagNameDataAttachSpecific" set "false", this setting does not effect. 142 | * 143 | * ex. 144 | * FlagNameDataAttachSpecificToTexture > true 145 | * 146 | * --------------------- 147 | * TextureSizePixelMaximum > PixelSize 148 | * PixelSize ... Max Texture Pixel-Size (int) 149 | * default == 8192 150 | * 151 | * ex. 152 | * TextureSizePixelMaximum > 4096 153 | * 154 | * --------------------- 155 | * FlagAttachControlGameObject > Flag 156 | * Flag ... true / false (bool) 157 | * default == true 158 | * 159 | * This is the same function as "Create Control-Prefab" in the import settings. 160 | * 161 | * ex: 162 | * FlagAttachControlGameObject > false 163 | * 164 | * --------------------- 165 | * FlagCreateProjectFolder > Flag 166 | * Flag ... true / false (bool) 167 | * default == true 168 | * 169 | * This is the same function as "Create Project Folder" in the import settings. 170 | * 171 | * ex: 172 | * FlagConfirmOverWrite > false 173 | * 174 | * --------------------- 175 | * FlagDataCalculateInAdvance > Flag 176 | * Flag ... true / false (bool) 177 | * default == false 178 | * 179 | * This is the same function as "Calculate in advance" in the import settings. 180 | * 181 | * ex: 182 | * FlagDataCalculateInAdvance > false 183 | * 184 | * --------------------- 185 | * FlagDataCompress > Flag 186 | * Flag ... true / false (bool) 187 | * default == true 188 | * 189 | * This is the same function as "Compress" in the import settings. 190 | * 191 | * ex: 192 | * FlagDataCompress > true 193 | * 194 | * --------------------- 195 | * FlagDataTakeOverSettingPrefab > Flag 196 | * Flag ... true / false (bool) 197 | * default == false 198 | * 199 | * This is the same function as "Take over setting" in the import settings. 200 | * 201 | * ex: 202 | * FlagDataTakeOverSettingPrefab > false 203 | * 204 | * --------------------- 205 | * CollisionThicknessZ > ValueZ 206 | * ValueZ ... Z-Axis Collision Thickness (float) 207 | * default == 1.0 208 | * 209 | * This is the same function as "Collider-Thickness" in the import settings. 210 | * 211 | * ex. 212 | * CollisionThicknessZ > 1.0 213 | * 214 | * --------------------- 215 | * FlagAttachRigidBody > Flag 216 | * Flag ... true / false (bool) 217 | * default == true 218 | * 219 | * This is the same function as "Attach Ridgid-Body to Collider" in the import settings. 220 | * 221 | * ex: 222 | * FlagAttachRigidBody > true 223 | * 224 | * --------------------- 225 | * FlagConfirmOverWrite > Flag 226 | * Flag ... true / false (bool) 227 | * default == false 228 | * 229 | * This is the same function as "Confirm Overwrite" in the import settings. 230 | * 231 | * ex: 232 | * FlagConfirmOverWrite > false 233 | * 234 | * --------------------- 235 | * FlagConfirmOverWriteRoot > Flag 236 | * Flag ... true / false (bool) 237 | * default == false 238 | * 239 | * This is the same function as "Root"(Additional "Confirm Overwrite") in the import settings. 240 | * 241 | * ex: 242 | * FlagConfirmOverWriteRoot > false 243 | * 244 | * --------------------- 245 | * FlagConfirmOverWriteRootEffect > Flag 246 | * Flag ... true / false (bool) 247 | * default == false 248 | * 249 | * This is the same function as "RootEffect"(Additional "Confirm Overwrite") in the import settings. 250 | * 251 | * ex: 252 | * FlagConfirmOverWriteRootEffect > false 253 | * 254 | * --------------------- 255 | * FlagConfirmOverWriteDataCellMap > Flag 256 | * Flag ... true / false (bool) 257 | * default == false 258 | * 259 | * This is the same function as "Fixed-CellMap Data"(Additional "Confirm Overwrite") in the import settings. 260 | * 261 | * ex: 262 | * FlagConfirmOverWriteDataCellMap > true 263 | * 264 | * --------------------- 265 | * FlagConfirmOverWriteDataAnimation > Flag 266 | * Flag ... true / false (bool) 267 | * default == false 268 | * 269 | * This is the same function as "Fixed-Animation Data"(Additional "Confirm Overwrite") in the import settings. 270 | * 271 | * ex: 272 | * FlagConfirmOverWriteDataAnimation > false 273 | * 274 | * --------------------- 275 | * FlagConfirmOverWriteDataEffect > Flag 276 | * Flag ... true / false (bool) 277 | * default == false 278 | * 279 | * This is the same function as "Fixed-Effect Data"(Additional "Confirm Overwrite") in the import settings. 280 | * 281 | * ex: 282 | * FlagConfirmOverWriteDataEffect > true 283 | * 284 | * --------------------- 285 | * FlagConfirmOverWriteMaterial > Flag 286 | * Flag ... true / false (bool) 287 | * default == false 288 | * 289 | * This is the same function as "Material"(Additional "Confirm Overwrite") in the import settings. 290 | * 291 | * ex: 292 | * FlagConfirmOverWriteMaterial > true 293 | * 294 | * --------------------- 295 | * FlagConfirmOverWriteTexture > Flag 296 | * Flag ... true / false (bool) 297 | * default == false 298 | * 299 | * This is the same function as "Texture"(Additional "Confirm Overwrite") in the import settings. 300 | * 301 | * ex: 302 | * FlagConfirmOverWriteTexture > false 303 | * 304 | * --------------------- 305 | * FlagGetAnimationReferencedPartsRoot > Flag 306 | * Flag ... true / false (bool) 307 | * default == true 308 | * 309 | * This is the same function as "Fixed-Animation Data" in the import settings. 310 | * 311 | * ex: 312 | * FlagGetAnimationReferencedPartsRoot > false 313 | * 314 | * --------------------- 315 | * FlagGetCellMapReferencedPartsRoot > Flag 316 | * Flag ... true / false (bool) 317 | * default == true 318 | * 319 | * This is the same function as "Fixed-CellMap Data" in the import settings. 320 | * 321 | * ex: 322 | * FlagGetCellMapReferencedPartsRoot > false 323 | * 324 | * --------------------- 325 | * FlagGetMaterialPartsRoot > Flag 326 | * Flag ... true / false (bool) 327 | * default == false 328 | * 329 | * This is the same function as "Material" in the import settings. 330 | * 331 | * ex: 332 | * FlagGetMaterialPartsRoot > true 333 | * 334 | * --------------------- 335 | * FlagGetTextureMaterial > Flag 336 | * Flag ... true / false (bool) 337 | * default == false 338 | * 339 | * This is the same function as "Texture (from Material)" in the import settings. 340 | * 341 | * ex: 342 | * FlagGetTextureMaterial > false 343 | * 344 | * ------------------------------------------ 345 | * 346 | * 347 | * [Caution] 348 | * 349 | * - Please describe only Single-Byte-Characters only. 350 | * (If you use Multi-Byte-Characters, you may difference of Character-Code in each environment to interfere with the processing.) 351 | * 352 | * - You must be create import destination Asset-Folders in advance. 353 | * 354 | 355 | * ++++++++++++++++++++++++++++++++++++++++ 356 | ? TextureSizePixelMaximum > 4096 357 | ? CollisionThicknessZ > 1.0 358 | ? FlagAttachRigidBody > true 359 | ? FlagAttachControlGameObject > true 360 | ? FlagConfirmOverWrite > false 361 | ? FlagCreateProjectFolder > true 362 | 363 | ? NameBaseFolderSS5Data > D:/User/ApplicationData/SS5/Menu 364 | ? NameBaseFolderAsset > Assets/Graphic/Menu 365 | 366 | Menu/Confirm.sspj 367 | Nowloading/NowLoading.sspj 368 | 369 | * ++++++++++++++++++++++++++++++++++++++++ 370 | ? NameBaseFolderSS5Data > D:/User/ApplicationData/SS5/Character 371 | ? NameBaseFolderAsset > Assets/Graphic/Character 372 | 373 | Character01.sspj 374 | Character02.sspj 375 | 376 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/Editor/Inspector_SpriteStudio_Root.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using UnityEditor; 9 | using System.Collections; 10 | 11 | [CustomEditor(typeof(Script_SpriteStudio_Root))] 12 | public class Inspector_SpriteStudio_Root : Editor 13 | { 14 | private static bool FoldOutStaticDatas; 15 | private static bool FoldOutMaterialTable; 16 | private static bool FoldOutPlayInformation; 17 | 18 | public override void OnInspectorGUI() 19 | { 20 | Script_SpriteStudio_Root Data = (Script_SpriteStudio_Root)target; 21 | 22 | EditorGUILayout.LabelField("[SpriteStudio (Parts-)Root]"); 23 | int LevelIndent = 0; 24 | 25 | EditorGUILayout.Space(); 26 | Data.InstanceManagerDraw = (Script_SpriteStudio_ManagerDraw)(EditorGUILayout.ObjectField("View (Manager-Draw)", Data.InstanceManagerDraw, typeof(Script_SpriteStudio_ManagerDraw), true)); 27 | 28 | EditorGUILayout.Space(); 29 | FoldOutStaticDatas = EditorGUILayout.Foldout(FoldOutStaticDatas, "Static Datas"); 30 | if(true == FoldOutStaticDatas) 31 | { 32 | EditorGUI.indentLevel = LevelIndent + 1; 33 | Data.DataCellMap = (Script_SpriteStudio_DataCell)(EditorGUILayout.ObjectField("Data:CellMap", Data.DataCellMap, typeof(Script_SpriteStudio_DataCell), true)); 34 | Data.DataAnimation = (Script_SpriteStudio_DataAnimation)(EditorGUILayout.ObjectField("Data:Animation", Data.DataAnimation, typeof(Script_SpriteStudio_DataAnimation), true)); 35 | EditorGUI.indentLevel = LevelIndent; 36 | } 37 | 38 | EditorGUILayout.Space(); 39 | FoldOutMaterialTable = EditorGUILayout.Foldout(FoldOutMaterialTable, "Based-Material Table"); 40 | if(true == FoldOutMaterialTable) 41 | { 42 | EditorGUI.indentLevel = LevelIndent + 1; 43 | if(null != Data.TableMaterial) 44 | { 45 | int CountShader = (int)(Library_SpriteStudio.KindColorOperation.TERMINATOR - 1); 46 | int Count = Data.TableMaterial.Length / CountShader; 47 | int MaterialNoTop = 0; 48 | Library_SpriteStudio.KindColorOperation MaterialTableNo = 0; 49 | string NameField = ""; 50 | for(int i=0; i IndexAnimationCursor) || (Data.DataAnimation.ListDataAnimation.Length <= IndexAnimationCursor)) 110 | { 111 | IndexAnimationCursor = 0; 112 | FlagUpdate |= true; 113 | } 114 | int IndexNow = EditorGUILayout.Popup("Animation Name", IndexAnimationCursor, ListNameAnimation); 115 | if(IndexNow != IndexAnimationCursor) 116 | { 117 | IndexAnimationCursor = IndexNow; 118 | Data.IndexAnimation = IndexAnimationCursor; 119 | FlagUpdate |= true; 120 | } 121 | 122 | DataAnimationBody = Data.DataAnimation.DataGetAnimation(IndexAnimationCursor); 123 | int FrameNoLast = DataAnimationBody.CountFrame - 1; 124 | int CountLabel = DataAnimationBody.CountGetLabel(); 125 | 126 | EditorGUILayout.LabelField( "- Frame Count: [" + DataAnimationBody.CountFrame.ToString() + "] (0 - " + FrameNoLast.ToString() + ")"); 127 | EditorGUILayout.Space(); 128 | 129 | /* "Label" Selector Create (for Start-Label / End-Label) */ 130 | string[] ListNameLabel = null; 131 | int[] ListIndexLabel = null; 132 | int[] ListFrameNoLabel = null; 133 | if(0 < CountLabel) 134 | { /* Has Labels */ 135 | CountLabel += 2; /* +2 ... "_start" and "_end" (Reserved-Labels) */ 136 | ListNameLabel = new string[CountLabel]; 137 | ListIndexLabel = new int[CountLabel]; 138 | ListFrameNoLabel = new int[CountLabel]; 139 | 140 | Library_SpriteStudio.Data.Label DataLabelBody = null; 141 | for(int j=1; j<(CountLabel-1); j++) 142 | { 143 | DataLabelBody = DataAnimationBody.DataGetLabel(j - 1); 144 | 145 | ListNameLabel[j] = DataLabelBody.Name; 146 | ListIndexLabel[j] = (j - 1); 147 | ListFrameNoLabel[j] = DataLabelBody.FrameNo; 148 | } 149 | } 150 | else 151 | { /* Has No-Labels */ 152 | CountLabel = 2; 153 | 154 | ListNameLabel = new string[CountLabel]; 155 | ListIndexLabel = new int[CountLabel]; 156 | ListFrameNoLabel = new int[CountLabel]; 157 | } 158 | ListNameLabel[0] = Library_SpriteStudio.ListNameLabelAnimationReserved[(int)Library_SpriteStudio.KindLabelAnimationReserved.START]; 159 | ListIndexLabel[0] = (int)(Library_SpriteStudio.KindLabelAnimationReserved.START | Library_SpriteStudio.KindLabelAnimationReserved.INDEX_RESERVED); 160 | ListFrameNoLabel[0] = 0; 161 | 162 | ListNameLabel[CountLabel - 1] = Library_SpriteStudio.ListNameLabelAnimationReserved[(int)Library_SpriteStudio.KindLabelAnimationReserved.END]; 163 | ListIndexLabel[CountLabel - 1] = (int)(Library_SpriteStudio.KindLabelAnimationReserved.END | Library_SpriteStudio.KindLabelAnimationReserved.INDEX_RESERVED); 164 | ListFrameNoLabel[CountLabel - 1] = FrameNoLast; 165 | 166 | int IndexListLabelStart = -1; 167 | int IndexListLabelEnd = -1; 168 | for(int i=0; i IndexListLabelStart) 180 | { 181 | IndexListLabelStart = 0; 182 | } 183 | if(0 > IndexListLabelEnd) 184 | { 185 | IndexListLabelEnd = CountLabel - 1; 186 | } 187 | 188 | int OffsetStart = Data.FrameOffsetStart; 189 | int OffsetEnd = Data.FrameOffsetEnd; 190 | int FrameNoStart = ListFrameNoLabel[IndexListLabelStart]; 191 | int FrameNoEnd = ListFrameNoLabel[IndexListLabelEnd]; 192 | int IndexListLabelNow; 193 | int FrameNoLimit; 194 | 195 | /* Range "Start" */ 196 | EditorGUILayout.LabelField( "Range Start: (" + FrameNoStart.ToString() 197 | + " + " 198 | + OffsetStart.ToString() 199 | + ") = " 200 | + (FrameNoStart + OffsetStart).ToString() 201 | ); 202 | 203 | /* Start-Label Select */ 204 | IndexListLabelNow = EditorGUILayout.Popup("Range Start Label", IndexListLabelStart, ListNameLabel); 205 | if(IndexListLabelNow != IndexListLabelStart) 206 | { /* Data is valid & Changed Animation */ 207 | IndexListLabelStart = IndexListLabelNow; 208 | FlagUpdate |= true; 209 | } 210 | Data.IndexLabelStart = ListIndexLabel[IndexListLabelStart]; 211 | FrameNoStart = ListFrameNoLabel[IndexListLabelStart]; 212 | 213 | /* Start-Offset */ 214 | FrameNoLimit = FrameNoEnd + OffsetEnd; 215 | OffsetStart = EditorGUILayout.IntField("Range Start Offset", Data.FrameOffsetStart); 216 | EditorGUILayout.LabelField( "- Valid Value Range: Min[" + (-FrameNoStart).ToString() + 217 | "] to Max[" + ((FrameNoLimit - FrameNoStart) - 1).ToString() + "] " 218 | ); 219 | 220 | OffsetStart = (FrameNoLimit <= (FrameNoStart + OffsetStart)) ? ((FrameNoLimit - FrameNoStart) - 1) : OffsetStart; 221 | OffsetStart = (0 > (FrameNoStart + OffsetStart)) ? (0 - FrameNoStart) : OffsetStart; 222 | OffsetStart = (FrameNoLast < (FrameNoStart + OffsetStart)) ? (FrameNoLast - FrameNoStart) : OffsetStart; 223 | if(Data.FrameOffsetStart != OffsetStart) 224 | { 225 | Data.FrameOffsetStart = OffsetStart; 226 | FlagUpdate |= true; 227 | } 228 | EditorGUILayout.Space(); 229 | 230 | /* Range "End" */ 231 | EditorGUILayout.LabelField( "Range End: (" + FrameNoEnd.ToString() 232 | + " + " 233 | + OffsetEnd.ToString() 234 | + ") = " 235 | + (FrameNoEnd + OffsetEnd).ToString() 236 | ); 237 | 238 | /* End-Label Select */ 239 | IndexListLabelNow = EditorGUILayout.Popup("Range End Label", IndexListLabelEnd, ListNameLabel); 240 | if(IndexListLabelNow != IndexListLabelEnd) 241 | { /* Data is valid & Changed Animation */ 242 | IndexListLabelEnd = IndexListLabelNow; 243 | FlagUpdate |= true; 244 | } 245 | Data.IndexLabelEnd = ListIndexLabel[IndexListLabelEnd]; 246 | FrameNoEnd = ListFrameNoLabel[IndexListLabelEnd]; 247 | 248 | /* End-Offset */ 249 | FrameNoLimit = FrameNoStart + OffsetStart; 250 | OffsetEnd = EditorGUILayout.IntField("Range End Offset", Data.FrameOffsetEnd); 251 | EditorGUILayout.LabelField( "- Valid Value Range: Min[" + ((FrameNoLimit - FrameNoEnd) + 1).ToString() + 252 | "] to Max[" + (FrameNoLast - FrameNoEnd).ToString() + "] " 253 | ); 254 | 255 | OffsetEnd = (FrameNoLimit >= (FrameNoEnd + OffsetEnd)) ? ((FrameNoLimit - FrameNoEnd) + 1) : OffsetEnd; 256 | OffsetEnd = (0 > (FrameNoEnd + OffsetEnd)) ? (0 - FrameNoEnd) : OffsetEnd; 257 | OffsetEnd = (FrameNoLast < (FrameNoEnd + OffsetEnd)) ? (FrameNoLast - FrameNoEnd) : OffsetEnd; 258 | if(Data.FrameOffsetEnd != OffsetEnd) 259 | { 260 | Data.FrameOffsetEnd = OffsetEnd; 261 | FlagUpdate |= true; 262 | } 263 | EditorGUILayout.Space(); 264 | 265 | int FrameNoRangeStart = FrameNoStart + OffsetStart; 266 | int FrameNoRangeEnd = FrameNoEnd + OffsetEnd; 267 | int CountFrameRange = FrameNoRangeEnd - FrameNoRangeStart; 268 | int FrameNoOffset = EditorGUILayout.IntField("Initial Start Offset", Data.FrameOffsetInitial); 269 | EditorGUILayout.LabelField( "- Valid Value Range: Min[0] to Max[" + CountFrameRange.ToString() + "]"); 270 | FrameNoOffset = (0 > FrameNoOffset) ? 0 : FrameNoOffset; 271 | FrameNoOffset = (CountFrameRange <= FrameNoOffset) ? CountFrameRange : FrameNoOffset; 272 | if(FrameNoOffset != Data.FrameOffsetInitial) 273 | { 274 | Data.FrameOffsetInitial = FrameNoOffset; 275 | FlagUpdate |= true; 276 | } 277 | 278 | EditorGUILayout.Space(); 279 | bool FlagPingpongNow = EditorGUILayout.Toggle("Play-Pingpong", Data.FlagPingpong); 280 | if(FlagPingpongNow != Data.FlagPingpong) 281 | { 282 | Data.FlagPingpong = FlagPingpongNow; 283 | FlagUpdate |= true; 284 | } 285 | 286 | EditorGUILayout.Space(); 287 | if(0.0f == Data.RateSpeedInitial) 288 | { 289 | Data.RateSpeedInitial = 1.0f; 290 | } 291 | float RateSpeedNow = EditorGUILayout.FloatField("Rate Time-Progress", Data.RateSpeedInitial); 292 | EditorGUILayout.LabelField("(set Negative-Value, Play Backwards.)"); 293 | if(RateSpeedNow != Data.RateSpeedInitial) 294 | { 295 | Data.RateSpeedInitial = RateSpeedNow; 296 | FlagUpdate |= true; 297 | } 298 | 299 | EditorGUILayout.Space(); 300 | int TimesPlayNow = EditorGUILayout.IntField("Number of Plays", Data.TimesPlay); 301 | EditorGUILayout.LabelField("(1: No Loop / 0: Infinite Loop)"); 302 | if(TimesPlayNow != Data.TimesPlay) 303 | { 304 | Data.TimesPlay = TimesPlayNow; 305 | FlagUpdate |= true; 306 | } 307 | 308 | EditorGUILayout.Space(); 309 | if(true == GUILayout.Button("Reset (Reinitialize)")) 310 | { 311 | Data.IndexAnimation = 0; 312 | Data.FrameOffsetInitial = 0; 313 | Data.RateSpeedInitial = 1.0f; 314 | Data.TimesPlay = 0; 315 | Data.FlagPingpong = false; 316 | Data.IndexLabelStart = (int)(Library_SpriteStudio.KindLabelAnimationReserved.START | Library_SpriteStudio.KindLabelAnimationReserved.INDEX_RESERVED); 317 | Data.FrameOffsetStart = 0; 318 | Data.IndexLabelEnd = (int)(Library_SpriteStudio.KindLabelAnimationReserved.END | Library_SpriteStudio.KindLabelAnimationReserved.INDEX_RESERVED); 319 | Data.FrameOffsetEnd = 0; 320 | Data.FlagAnimationStopInitial = false; 321 | FlagUpdate = true; /* Force */ 322 | } 323 | 324 | /* Re-Play Animation */ 325 | if(true == FlagUpdate) 326 | { 327 | Data.AnimationPlay(); 328 | if(true == Data.FlagAnimationStopInitial) 329 | { 330 | Data.AnimationStop(); 331 | } 332 | } 333 | } 334 | else 335 | { 336 | EditorGUILayout.LabelField("Error[Datas Missing! (Fatal)]"); 337 | } 338 | } 339 | EditorGUI.indentLevel = LevelIndent; 340 | EditorGUILayout.Space(); 341 | 342 | // Data.FlagHideForce = EditorGUILayout.Toggle("Force-Hide", Data.FlagHideForce); 343 | // if(true == GUILayout.Button("Apply \"Force-Hide\" to Children")) 344 | // { 345 | // LibraryEditor_SpriteStudio.Utility.HideSetForce(Data.gameObject, Data.FlagHideForce, true, false); 346 | // } 347 | // EditorGUILayout.Space(); 348 | 349 | // EditorGUILayout.Space(); 350 | // if(true == GUILayout.Button("Reset Parent-\"View\"")) 351 | // { 352 | // Data.ViewSet(); 353 | // } 354 | 355 | if(true == GUI.changed) 356 | { 357 | EditorUtility.SetDirty(target); 358 | } 359 | } 360 | } 361 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Data/Attribute.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System.Collections.Generic; 10 | 11 | public static partial class Library_SpriteStudio 12 | { 13 | public static partial class Data 14 | { 15 | /* ------------------------------------------------------------ for NULL/Normal(Sprite)-Parts */ 16 | [System.Serializable] 17 | public class AttributeStatus 18 | { 19 | [System.Flags] 20 | public enum FlagBit : int 21 | { 22 | VALID = 0x00000001, 23 | HIDE = 0x00000002, 24 | 25 | FLIPX = 0x00000010, 26 | FLIPY = 0x00000020, 27 | FLIPXTEXTURE = 0x00000040, 28 | FLIPYTEXTURE = 0x00000080, 29 | 30 | PARTSIDNEXT = 0x7fff0000, 31 | 32 | // CLEAR = PARTSIDNEXT 33 | CLEAR = 0x00000000 34 | } 35 | 36 | public FlagBit Flags; 37 | 38 | public bool IsValid 39 | { 40 | get 41 | { 42 | return(0 != (Flags & FlagBit.VALID)); 43 | } 44 | } 45 | public bool IsHide 46 | { 47 | get 48 | { 49 | return(0 != (Flags & FlagBit.HIDE)); 50 | } 51 | } 52 | public bool IsFlipX 53 | { 54 | get 55 | { 56 | return(0 != (Flags & FlagBit.FLIPX)); 57 | } 58 | } 59 | public bool IsFlipY 60 | { 61 | get 62 | { 63 | return(0 != (Flags & FlagBit.FLIPY)); 64 | } 65 | } 66 | public bool IsTextureFlipX 67 | { 68 | get 69 | { 70 | return(0 != (Flags & FlagBit.FLIPXTEXTURE)); 71 | } 72 | } 73 | public bool IsTextureFlipY 74 | { 75 | get 76 | { 77 | return(0 != (Flags & FlagBit.FLIPYTEXTURE)); 78 | } 79 | } 80 | public int PartsIDNext 81 | { 82 | get 83 | { 84 | FlagBit Data = Flags & FlagBit.PARTSIDNEXT; 85 | return((0 == Data) ? (-1) : ((int)Data >> 16)); 86 | } 87 | } 88 | 89 | public void CleanUp() 90 | { 91 | Flags = FlagBit.CLEAR; 92 | } 93 | 94 | // public void Duplicate(AttributeStatus Original) 95 | 96 | public override bool Equals(System.Object Target) 97 | { 98 | if((null == Target) || (GetType() != Target.GetType())) 99 | { 100 | return(false); 101 | } 102 | 103 | AttributeStatus TargetData = (AttributeStatus)Target; 104 | if( (IsValid == TargetData.IsValid) 105 | && (IsHide == TargetData.IsHide) 106 | && (IsFlipX == TargetData.IsFlipX) 107 | && (IsFlipY == TargetData.IsFlipY) 108 | && (IsTextureFlipX == TargetData.IsTextureFlipX) 109 | && (IsTextureFlipY == TargetData.IsTextureFlipY) 110 | && (PartsIDNext == TargetData.PartsIDNext) 111 | ) 112 | { 113 | return(true); 114 | } 115 | return(false); 116 | } 117 | 118 | public override int GetHashCode() 119 | { 120 | return(base.GetHashCode()); 121 | } 122 | } 123 | 124 | [System.Serializable] 125 | public class AttributeColorBlend 126 | { 127 | public KindColorBound Bound; 128 | public KindColorOperation Operation; 129 | public Color[] VertexColor; 130 | public float[] RatePixelAlpha; 131 | 132 | public void CleanUp() 133 | { 134 | Bound = KindColorBound.NON; 135 | Operation = KindColorOperation.NON; 136 | VertexColor = null; 137 | RatePixelAlpha = null; 138 | } 139 | 140 | public void Duplicate(AttributeColorBlend Original) 141 | { 142 | Bound = Original.Bound; 143 | Operation = Original.Operation; 144 | for(int i=0; i<(int)Library_SpriteStudio.KindVertexNo.TERMINATOR2; i++) 145 | { 146 | VertexColor[i] = Original.VertexColor[i]; 147 | RatePixelAlpha[i] = Original.RatePixelAlpha[i]; 148 | } 149 | } 150 | 151 | public override bool Equals(System.Object Target) 152 | { 153 | if((null == Target) || (GetType() != Target.GetType())) 154 | { 155 | return(false); 156 | } 157 | 158 | AttributeColorBlend TargetData = (AttributeColorBlend)Target; 159 | int Count; 160 | 161 | if(Bound != TargetData.Bound) 162 | { 163 | return(false); 164 | } 165 | if(Operation == TargetData.Operation) 166 | { 167 | return(false); 168 | } 169 | 170 | Count = VertexColor.Length; 171 | if(Count != TargetData.VertexColor.Length) 172 | { 173 | return(false); 174 | } 175 | for(int i=0; i 25 | null == Failure 26 | 27 | Generate a new Material-Table(Array of Material) from array of texture.
28 | Generated Material-Table can be set to "Script_SpriteStudio_Root.TableMaterial".
29 |
30 | (Result's) Format: (MT = Material-Table)
31 | MT[0]: TableDataTexture[0] / Shader for "Mix"-Operation
32 | MT[1]: TableDataTexture[0] / Shader for "Add"-Operation
33 | MT[2]: TableDataTexture[0] / Shader for "Sub"-Operation
34 | MT[3]: TableDataTexture[0] / Shader for "Mul"-Operation
35 | MT[4]: TableDataTexture[1] / Shader for "Mix"-Operation
36 | MT[5]: TableDataTexture[1] / Shader for "Add"-Operation
37 | ...
38 | */ 39 | public static Material[] Create(Texture2D[] TableDataTexture) 40 | { 41 | if(null == TableDataTexture) 42 | { 43 | return(null); 44 | } 45 | int CountTexture = TableDataTexture.Length; 46 | if(0 >= CountTexture) 47 | { 48 | return(null); 49 | } 50 | 51 | Material[] TableDataMaterialNew = new Material[CountTexture * CountTextureBlock]; 52 | int IndexTop; 53 | for(int i=0; i 72 | null == Failure 73 | 74 | Generate a new Material-Table(Array of Material) from array of texture.
75 | Generated Material-Table can be set to "Script_SpriteStudio_RootEffect.TableMaterial".
76 |
77 | (Result's) Format: (MT = Material-Table)
78 | MT[0]: TableDataTexture[0] / Shader for "Mix"-Operation
79 | MT[1]: TableDataTexture[0] / Shader for "Add"-Operation ("PreMultiplied Alpha" Add)
80 | MT[2]: TableDataTexture[0] / Shader for "Add2"-Operation ("Straight Alpha" Add)
81 | MT[3]: TableDataTexture[1] / Shader for "Mix"-Operation
82 | MT[4]: TableDataTexture[1] / Shader for "Add"-Operation ("PreMultiplied Alpha" Add)
83 | MT[5]: TableDataTexture[1] / Shader for "Add2"-Operation ("Straight Alpha" Add)
84 | ...
85 | */ 86 | public static Material[] CreateEffect(Texture2D[] TableDataTexture) 87 | { 88 | if(null == TableDataTexture) 89 | { 90 | return(null); 91 | } 92 | int CountTexture = TableDataTexture.Length; 93 | if(0 >= CountTexture) 94 | { 95 | return(null); 96 | } 97 | 98 | Material[] TableDataMaterialNew = new Material[CountTexture * CountTextureBlockEffect]; 99 | int IndexTop; 100 | for(int i=0; i 119 | null == Failure 120 | 121 | Generate a duplicate of "TableDataMaterial".
122 | Caution: The result is another instance the "TableDataMaterial".
123 |
124 | (Result's) Format: (MT = Material-Table)
125 | MT[0]: Copy of TableDataMaterial[0]
126 | MT[1]: Copy of TableDataMaterial[1]
127 | MT[2]: Copy of TableDataMaterial[2]
128 | ...
129 | */ 130 | public static Material[] Copy(Material[] TableDataMaterial) 131 | { 132 | if(null == TableDataMaterial) 133 | { 134 | return(null); 135 | } 136 | int CountTableMaterial = TableDataMaterial.Length; 137 | if(0 >= CountTableMaterial) 138 | { 139 | return(null); 140 | } 141 | 142 | /* Create Copy-Material */ 143 | Material[] TableDataMaterialNew = new Material[CountTableMaterial]; 144 | for(int i=0; i 162 | 0 == Failure 163 | 164 | Calculate index of Material-Table (for "Script_SpriteStudio_Root") from the Texture-Index.
165 | 1 Texture is defined in 4 Material on the Material-Table, the result is "IndexTexture * 4".
166 | (4 Material : Shader is assigned to each Material ... "Mix", "Add", "Sub" and "Mul".)
167 |
168 | Ex.
169 | int IndexMaterial = Library_SpriteStudio.IndexGetMaterial(2);
170 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.MIX].mainTexture = Texture02;
171 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.ADD].mainTexture = Texture02;
172 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.SUB].mainTexture = Texture02;
173 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.MUL].mainTexture = Texture02;
174 | */ 175 | public static int IndexGetMaterial(int IndexTexture) 176 | { 177 | return((0 > IndexTexture) ? -1 : (IndexTexture * CountTextureBlock)); 178 | } 179 | 180 | /* ******************************************************** */ 181 | //! Get Material-Table Index from Texture-Index (for "RootEffect") 182 | /*! 183 | @param IndexTexture 184 | Texture-Index (on Stored Material-Table) 185 | @retval Return-Value 186 | Count of Texture
187 | 0 == Failure 188 | 189 | Calculate index of Material-Table (for "Script_SpriteStudio_RootEffect") from the Texture-Index.
190 | 1 Texture is defined in 2 Material on the Material-Table, the result is "IndexTexture * 2".
191 | (4 Material : Shader is assigned to each Material ... "Mix" and "Add".)
192 |
193 | Ex.
194 | int IndexMaterial = Library_SpriteStudio.IndexGetMaterialEffect(3);
195 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.MIX].mainTexture = Texture03;
196 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.ADD].mainTexture = Texture03;
197 | MaterialTable[IndexMaterial + (int)Library_SpriteStudio.KindColorOperation.ADD2].mainTexture = Texture03;
198 | */ 199 | public static int IndexGetMaterialEffect(int IndexTexture) 200 | { 201 | return((0 > IndexTexture) ? -1 : (IndexTexture * CountTextureBlockEffect)); 202 | } 203 | 204 | /* ******************************************************** */ 205 | //! Get count of Textures (for "Root") 206 | /*! 207 | @param TableDataMaterial 208 | Source Material-Table (Array of Material) 209 | @retval Return-Value 210 | Count of Texture
211 | 0 == Failure 212 | 213 | Get count of textures that can be set to Material-Table (for "Script_SpriteStudio_Root").
214 | "Material-Table" is assigned 4-Material per 1-Texture.
215 |
216 | (Materual-Table's) Format: (MT = Material-Table)
217 | MT[0]: Texture-0 / Shader for "Mix"-Operation
218 | MT[1]: Texture-0 / Shader for "Add"-Operation
219 | MT[2]: Texture-0 / Shader for "Sub"-Operation
220 | MT[3]: Texture-0 / Shader for "Mul"-Operation
221 | MT[4]: Texture-1 / Shader for "Mix"-Operation
222 | MT[5]: Texture-1 / Shader for "Add"-Operation
223 | ...
224 | */ 225 | public static int CountGetTexture(Material[] TableDataMaterial) 226 | { 227 | if(null == TableDataMaterial) 228 | { 229 | return(0); 230 | } 231 | int CountTableMaterial = TableDataMaterial.Length; 232 | if(0 >= CountTableMaterial) 233 | { 234 | return(0); 235 | } 236 | 237 | return(CountTableMaterial / CountTextureBlock); 238 | } 239 | 240 | /* ******************************************************** */ 241 | //! Get count of Textures (for "RootEffect") 242 | /*! 243 | @param TableDataMaterial 244 | Source Material-Table (Array of Material) 245 | @retval Return-Value 246 | Count of Texture
247 | 0 == Failure 248 | 249 | Get count of textures that can be set to Material-Table (for "Script_SpriteStudio_RootEffect").
250 | "Material-Table" is assigned 2-Material per 1-Texture.
251 |
252 | (Materual-Table's) Format: (MT = Material-Table)
253 | MT[0]: Texture-0 / Shader for "Mix"-Operation
254 | MT[1]: Texture-0 / Shader for "Add"-Operation
255 | MT[2]: Texture-0 / Shader for "Add2"-Operation
256 | MT[3]: Texture-1 / Shader for "Mix"-Operation
257 | MT[4]: Texture-1 / Shader for "Add"-Operation
258 | MT[5]: Texture-1 / Shader for "Add2"-Operation
259 | ...
260 | */ 261 | public static int CountGetTextureEffect(Material[] TableDataMaterial) 262 | { 263 | if(null == TableDataMaterial) 264 | { 265 | return(0); 266 | } 267 | int CountTableMaterial = TableDataMaterial.Length; 268 | if(0 >= CountTableMaterial) 269 | { 270 | return(0); 271 | } 272 | 273 | return(CountTableMaterial / CountTextureBlockEffect); 274 | } 275 | 276 | /* ******************************************************** */ 277 | //! Change 1-Texture in Material-Table (for "Root") 278 | /*! 279 | @param Index 280 | Texture No. 281 | @param DataTexture 282 | Texture 283 | @param TableDataMaterial 284 | Material-Table 285 | @retval Return-Value 286 | true == Success
287 | false == Failure 288 | 289 | Change 1-Texture is set in Material-Table (for "Script_SpriteStudio_Root").
290 | Texture is set to "TableDataMaterial[Index * 4] to TableDataMaterial[Index * 4 + 3]". 291 | */ 292 | public static bool TextureChange(int Index, Texture2D DataTexture, Material[] TableDataMaterial) 293 | { 294 | if(null == TableDataMaterial) 295 | { 296 | return(false); 297 | } 298 | int CountTableMaterial = TableDataMaterial.Length; 299 | if(0 >= CountTableMaterial) 300 | { 301 | return(false); 302 | } 303 | 304 | int IndexMaterial = Index * CountTextureBlock; 305 | if((0 > IndexMaterial) || (CountTableMaterial <= IndexMaterial)) 306 | { 307 | return(false); 308 | } 309 | for(int i=0; i 327 | false == Failure 328 | 329 | Change 1-Texture is set in Material-Table (for "Script_SpriteStudio_RootEffect").
330 | Texture is set to "TableDataMaterial[Index * 3] to TableDataMaterial[Index * 3 + 2]". 331 | */ 332 | public static bool TextureChangeEffect(int Index, Texture2D DataTexture, Material[] TableDataMaterial) 333 | { 334 | if(null == TableDataMaterial) 335 | { 336 | return(false); 337 | } 338 | int CountTableMaterial = TableDataMaterial.Length; 339 | if(0 >= CountTableMaterial) 340 | { 341 | return(false); 342 | } 343 | 344 | int IndexMaterial = Index * CountTextureBlockEffect; 345 | if((0 > IndexMaterial) || (CountTableMaterial <= IndexMaterial)) 346 | { 347 | return(false); 348 | } 349 | for(int i=0; i 365 | false == Failure 366 | 367 | Change Multiple-Textures is set in Material-Table (for "Script_SpriteStudio_Root").
368 | Textures are set from Top of the Material-Table.
369 | Texture exceeds the number that can be stored in "Material-Table" is ignored.
370 | */ 371 | public static bool TextureChange(Texture2D[] TableDataTexture, Material[] TableDataMaterial) 372 | { 373 | if(null == TableDataMaterial) 374 | { 375 | return(false); 376 | } 377 | int CountTableMaterial = TableDataMaterial.Length; 378 | if(0 >= CountTableMaterial) 379 | { 380 | return(false); 381 | } 382 | 383 | if(null == TableDataTexture) 384 | { 385 | return(false); 386 | } 387 | int CountTexture = TableDataTexture.Length; 388 | if(0 >= CountTexture) 389 | { 390 | return(false); 391 | } 392 | 393 | int CountChangeLength = CountTexture * CountTextureBlock; 394 | if(CountChangeLength > CountTableMaterial) 395 | { 396 | CountChangeLength = CountTableMaterial; 397 | } 398 | 399 | for(int i=0; i 415 | false == Failure 416 | 417 | Change Multiple-Textures is set in Material-Table (for "Script_SpriteStudio_RootEffect").
418 | Textures are set from Top of the Material-Table.
419 | Texture exceeds the number that can be stored in "Material-Table" is ignored.
420 | */ 421 | public static bool TextureChangeEffect(Texture2D[] TableDataTexture, Material[] TableDataMaterial) 422 | { 423 | if(null == TableDataMaterial) 424 | { 425 | return(false); 426 | } 427 | int CountTableMaterial = TableDataMaterial.Length; 428 | if(0 >= CountTableMaterial) 429 | { 430 | return(false); 431 | } 432 | 433 | if(null == TableDataTexture) 434 | { 435 | return(false); 436 | } 437 | int CountTexture = TableDataTexture.Length; 438 | if(0 >= CountTexture) 439 | { 440 | return(false); 441 | } 442 | 443 | int CountChangeLength = CountTexture * CountTextureBlockEffect; 444 | if(CountChangeLength > CountTableMaterial) 445 | { 446 | CountChangeLength = CountTableMaterial; 447 | } 448 | 449 | for(int i=0; i' }; 121 | 122 | /* Command-Names for Setting-Changing */ 123 | private const string CommandNameBaseFolderSS5Data = "NameBaseFolderSS5Data"; 124 | private const string CommandNameBaseFolderAsset = "NameBaseFolderAsset"; 125 | 126 | private const string CommandFlagNameDataRuleOld = "FlagNameDataRuleOld"; 127 | private const string CommandFlagNameDataAttachSpecific = "FlagNameDataAttachSpecific"; 128 | private const string CommandFlagNameDataAttachSpecificToPrefab = "FlagNameDataAttachSpecificToPrefab"; 129 | private const string CommandFlagNameDataAttachSpecificToTexture = "FlagNameDataAttachSpecificToTexture"; 130 | private const string CommandFlagNameDataAttachSpecificSSPJ = "FlagNameDataAttachSpecificSSPJ"; 131 | 132 | private const string CommandTextureSizePixelMaximum = "TextureSizePixelMaximum"; 133 | private const string CommandFlagAttachControlGameObject = "FlagAttachControlGameObject"; 134 | private const string CommandFlagCreateProjectFolder = "FlagCreateProjectFolder"; 135 | private const string CommandFlagDataCalculateInAdvance = "FlagDataCalculateInAdvance"; 136 | private const string CommandFlagDataCompress = "FlagDataCompress"; 137 | private const string CommandFlagDataTakeOverSettingPrefab = "FlagDataTakeOverSettingPrefab"; 138 | 139 | private const string CommandCollisionThicknessZ = "CollisionThicknessZ"; 140 | private const string CommandFlagAttachRigidBody = "FlagAttachRigidBody"; 141 | 142 | private const string CommandFlagConfirmOverWrite = "FlagConfirmOverWrite"; 143 | private const string CommandFlagConfirmOverWriteRoot = "FlagConfirmOverWriteRoot"; 144 | private const string CommandFlagConfirmOverWriteRootEffect = "FlagConfirmOverWriteRootEffect"; 145 | private const string CommandFlagConfirmOverWriteDataCellMap = "FlagConfirmOverWriteDataCellMap"; 146 | private const string CommandFlagConfirmOverWriteDataAnimation = "FlagConfirmOverWriteDataAnimation"; 147 | private const string CommandFlagConfirmOverWriteDataEffect = "FlagConfirmOverWriteDataEffect"; 148 | private const string CommandFlagConfirmOverWriteMaterial = "FlagConfirmOverWriteMaterial"; 149 | private const string CommandFlagConfirmOverWriteTexture = "FlagConfirmOverWriteTexture"; 150 | 151 | private const string CommandFlagGetAnimationReferencedPartsRoot = "FlagGetAnimationReferencedPartsRoot"; 152 | private const string CommandFlagGetCellMapReferencedPartsRoot = "FlagGetCellMapReferencedPartsRoot"; 153 | private const string CommandFlagGetMaterialPartsRoot = "FlagGetMaterialPartsRoot"; 154 | private const string CommandFlagGetTextureMaterial = "FlagGetTextureMaterial"; 155 | 156 | private const string TextTrue = "true"; 157 | private const string TextFalse = "false"; 158 | 159 | internal static string TextTrim(string Text) 160 | { 161 | return(Text.Trim(TextIgnored)); 162 | } 163 | 164 | internal static bool ChangeSetting(ref LibraryEditor_SpriteStudio.SettingImport DataSettingImport, string TextLine) 165 | { 166 | /* Sprit Line */ 167 | string TextLineTrimmed = TextTrim(TextLine); 168 | string[] Arguments = TextLineTrimmed.Split(TextSeparatorCommand); 169 | string TextCommand = TextTrim(Arguments[0]); 170 | string TextParameter = ""; 171 | 172 | /* Command Decoding */ 173 | switch(TextCommand) 174 | { 175 | case CommandNameBaseFolderAsset: /* NameBaseFolderAsset */ 176 | /* NameBaseFolderAsset [Base Asset-Folder Name] */ 177 | TextParameter = String.Copy(Arguments[1]); 178 | NameBaseFolderAsset = TextTrim(TextParameter); 179 | break; 180 | 181 | case CommandNameBaseFolderSS5Data: /* NameBaseFolderSS5Data */ 182 | /* NameBaseFolderSS5Data [Base Folder Name] */ 183 | TextParameter = String.Copy(Arguments[1]); 184 | NameBaseFolderSS5Data = TextTrim(TextParameter); 185 | break; 186 | 187 | case CommandFlagNameDataRuleOld: /* FlagNameDataRuleOld */ 188 | /* FlagNameDataRuleOld [true/false] */ 189 | TextParameter = String.Copy(Arguments[1]); 190 | DataSettingImport.FlagNameDataRuleOld = FlagGetChangeSetting(TextParameter); 191 | break; 192 | 193 | case CommandFlagNameDataAttachSpecific: /* FlagNameDataAttachSpecific */ 194 | /* FlagNameDataAttachSpecific [true/false] */ 195 | TextParameter = String.Copy(Arguments[1]); 196 | DataSettingImport.FlagNameDataAttachSpecific = FlagGetChangeSetting(TextParameter); 197 | break; 198 | 199 | case CommandFlagNameDataAttachSpecificToPrefab: /* FlagNameDataAttachSpecificToPrefab */ 200 | /* FlagNameDataAttachSpecificToPrefab [true/false] */ 201 | TextParameter = String.Copy(Arguments[1]); 202 | DataSettingImport.FlagNameDataAttachSpecificToPrefab = FlagGetChangeSetting(TextParameter); 203 | break; 204 | 205 | case CommandFlagNameDataAttachSpecificToTexture: /* FlagNameDataAttachSpecificToTexture */ 206 | /* FlagNameDataAttachSpecificToTexture [true/false] */ 207 | TextParameter = String.Copy(Arguments[1]); 208 | DataSettingImport.FlagNameDataAttachSpecificToTexture = FlagGetChangeSetting(TextParameter); 209 | break; 210 | 211 | case CommandFlagNameDataAttachSpecificSSPJ: /* FlagNameDataAttachSpecificSSPJ */ 212 | /* FlagNameDataAttachSpecificSSPJ [true/false] */ 213 | TextParameter = String.Copy(Arguments[1]); 214 | DataSettingImport.FlagNameDataAttachSpecificSSPJ = FlagGetChangeSetting(TextParameter); 215 | break; 216 | 217 | case CommandTextureSizePixelMaximum: /* TextureSizePixelMaximum */ 218 | /* TextureSizePixelMaximum [value] */ 219 | TextParameter = String.Copy(Arguments[1]); 220 | DataSettingImport.TextureSizePixelMaximum = IntGetChangeSetting(TextParameter); 221 | break; 222 | 223 | case CommandFlagAttachControlGameObject: /* FlagAttachControlGameObject */ 224 | /* FlagAttachControlGameObject [true/false] */ 225 | TextParameter = String.Copy(Arguments[1]); 226 | DataSettingImport.FlagAttachControlGameObject = FlagGetChangeSetting(TextParameter); 227 | break; 228 | 229 | case CommandFlagCreateProjectFolder: /* FlagCreateProjectFolder */ 230 | /* FlagCreateProjectFolder [true/false] */ 231 | TextParameter = String.Copy(Arguments[1]); 232 | DataSettingImport.FlagCreateProjectFolder = FlagGetChangeSetting(TextParameter); 233 | break; 234 | 235 | case CommandFlagDataCalculateInAdvance: /* FlagDataCalculateInAdvance */ 236 | TextParameter = String.Copy(Arguments[1]); 237 | DataSettingImport.FlagDataCalculateInAdvance = FlagGetChangeSetting(TextParameter); 238 | break; 239 | 240 | case CommandFlagDataCompress: /* FlagDataCompress */ 241 | TextParameter = String.Copy(Arguments[1]); 242 | DataSettingImport.FlagDataCompress = FlagGetChangeSetting(TextParameter); 243 | break; 244 | 245 | case CommandFlagDataTakeOverSettingPrefab: /* FlagDataTakeOverSettingPrefab */ 246 | TextParameter = String.Copy(Arguments[1]); 247 | DataSettingImport.FlagDataTakeOverSettingPrefab = FlagGetChangeSetting(TextParameter); 248 | break; 249 | 250 | case CommandCollisionThicknessZ: /* CollisionThicknessZ */ 251 | /* CollisionThicknessZ [value] */ 252 | TextParameter = String.Copy(Arguments[1]); 253 | DataSettingImport.CollisionThicknessZ = FloatGetChangeSetting(TextParameter); 254 | break; 255 | 256 | case CommandFlagAttachRigidBody: /* FlagAttachRigidBody */ 257 | /* FlagAttachRigidBody [true/false] */ 258 | TextParameter = String.Copy(Arguments[1]); 259 | DataSettingImport.FlagAttachRigidBody = FlagGetChangeSetting(TextParameter); 260 | break; 261 | 262 | case CommandFlagConfirmOverWrite: /* FlagConfirmOverWrite */ 263 | /* FlagConfirmOverWrite [true/false] */ 264 | TextParameter = String.Copy(Arguments[1]); 265 | DataSettingImport.FlagConfirmOverWrite = FlagGetChangeSetting(TextParameter); 266 | break; 267 | 268 | case CommandFlagConfirmOverWriteRoot: /* FlagConfirmOverWriteRoot */ 269 | /* FlagConfirmOverWriteRoot [true/false] */ 270 | TextParameter = String.Copy(Arguments[1]); 271 | DataSettingImport.FlagConfirmOverWriteRoot = FlagGetChangeSetting(TextParameter); 272 | break; 273 | 274 | case CommandFlagConfirmOverWriteRootEffect: /* FlagConfirmOverWriteRootEffect */ 275 | /* FlagConfirmOverWriteRootEffect [true/false] */ 276 | TextParameter = String.Copy(Arguments[1]); 277 | DataSettingImport.FlagConfirmOverWriteRootEffect = FlagGetChangeSetting(TextParameter); 278 | break; 279 | 280 | case CommandFlagConfirmOverWriteDataCellMap: /* FlagConfirmOverWriteDataCellMap */ 281 | /* FlagConfirmOverWriteDataCellMap [true/false] */ 282 | TextParameter = String.Copy(Arguments[1]); 283 | DataSettingImport.FlagConfirmOverWriteDataCellMap = FlagGetChangeSetting(TextParameter); 284 | break; 285 | 286 | case CommandFlagConfirmOverWriteDataAnimation: /* FlagConfirmOverWriteDataAnimation */ 287 | /* FlagConfirmOverWriteDataAnimation [true/false] */ 288 | TextParameter = String.Copy(Arguments[1]); 289 | DataSettingImport.FlagConfirmOverWriteDataAnimation = FlagGetChangeSetting(TextParameter); 290 | break; 291 | 292 | case CommandFlagConfirmOverWriteDataEffect: /* FlagConfirmOverWriteDataEffect */ 293 | /* FlagConfirmOverWriteDataEffect [true/false] */ 294 | TextParameter = String.Copy(Arguments[1]); 295 | DataSettingImport.FlagConfirmOverWriteDataEffect = FlagGetChangeSetting(TextParameter); 296 | break; 297 | 298 | case CommandFlagConfirmOverWriteMaterial: /* FlagConfirmOverWriteMaterial */ 299 | /* FlagConfirmOverWriteMaterial [true/false] */ 300 | TextParameter = String.Copy(Arguments[1]); 301 | DataSettingImport.FlagConfirmOverWriteMaterial = FlagGetChangeSetting(TextParameter); 302 | break; 303 | 304 | case CommandFlagConfirmOverWriteTexture: /* FlagConfirmOverWriteTexture */ 305 | /* FlagConfirmOverWriteTexture [true/false] */ 306 | TextParameter = String.Copy(Arguments[1]); 307 | DataSettingImport.FlagConfirmOverWriteTexture = FlagGetChangeSetting(TextParameter); 308 | break; 309 | 310 | case CommandFlagGetAnimationReferencedPartsRoot: /* FlagGetAnimationReferencedPartsRoot */ 311 | TextParameter = String.Copy(Arguments[1]); 312 | DataSettingImport.FlagGetAnimationReferencedPartsRoot = FlagGetChangeSetting(TextParameter); 313 | break; 314 | 315 | case CommandFlagGetCellMapReferencedPartsRoot: /* FlagGetCellMapReferencedPartsRoot */ 316 | TextParameter = String.Copy(Arguments[1]); 317 | DataSettingImport.FlagGetCellMapReferencedPartsRoot = FlagGetChangeSetting(TextParameter); 318 | break; 319 | 320 | case CommandFlagGetMaterialPartsRoot: /* FlagGetMaterialPartsRoot */ 321 | TextParameter = String.Copy(Arguments[1]); 322 | DataSettingImport.FlagGetMaterialPartsRoot = FlagGetChangeSetting(TextParameter); 323 | break; 324 | 325 | case CommandFlagGetTextureMaterial: /* FlagGetTextureMaterial */ 326 | TextParameter = String.Copy(Arguments[1]); 327 | DataSettingImport.FlagGetTextureMaterial = FlagGetChangeSetting(TextParameter); 328 | break; 329 | 330 | default: /* Command Error */ 331 | return(false); 332 | } 333 | return(true); 334 | } 335 | private static bool FlagGetChangeSetting(string Text) 336 | { 337 | string TextParameter = TextTrim(Text); 338 | switch(TextParameter) 339 | { 340 | case TextTrue: 341 | return(true); 342 | 343 | case TextFalse: 344 | return(false); 345 | } 346 | return(false); 347 | } 348 | private static int IntGetChangeSetting(string Text) 349 | { 350 | return(System.Convert.ToInt32(Text)); 351 | } 352 | private static float FloatGetChangeSetting(string Text) 353 | { 354 | return(System.Convert.ToSingle(Text)); 355 | } 356 | 357 | internal static bool Import(ref LibraryEditor_SpriteStudio.SettingImport DataSettingImport, string TextLine) 358 | { 359 | /* Calling Importer */ 360 | string NameFileInput = TextTrim(TextLine); 361 | bool Rv = false; 362 | if(false == String.IsNullOrEmpty(NameFileInput)) 363 | { 364 | if(false == String.IsNullOrEmpty(NameBaseFolderSS5Data)) 365 | { 366 | NameFileInput = NameBaseFolderSS5Data + "/" + NameFileInput; 367 | } 368 | Rv = LibraryEditor_SpriteStudio.Menu.ImportSSPJ( DataSettingImport, 369 | NameFileInput, 370 | NameBaseFolderAsset, 371 | false, /* Import-Setting Not-Saved */ 372 | true, /* Display Progress-Bar */ 373 | false /* Don't Stop, Error Importing-SSPJ */ 374 | ); 375 | } 376 | return(Rv); 377 | } 378 | } 379 | } 380 | -------------------------------------------------------------------------------- /Assets/SpriteStudio/ScriptLibrary/Utility/TableCellChange.cs: -------------------------------------------------------------------------------- 1 | /** 2 | SpriteStudio5 Player for Unity 3 | 4 | Copyright(C) Web Technology Corp. 5 | All rights reserved. 6 | */ 7 | using UnityEngine; 8 | 9 | public static partial class Library_SpriteStudio 10 | { 11 | public static partial class Utility 12 | { 13 | public static partial class TableCellChange 14 | { 15 | /* ******************************************************** */ 16 | //! Create "Cell-Map Change"-Table 17 | /*! 18 | @param InstanceRoot 19 | Animation(or Effect)-Data 20 | @retval Return-Value 21 | Created "Cell-Map Change"-Table
22 | null == Failure 23 | 24 | Create the "Cell-Map Change"-Table on the basis of the initial "Cell-Map" information of the animation data.
25 | Caution: The result is referencing data in initial "Cell-Map"s. 26 | */ 27 | public static Library_SpriteStudio.Control.CellChange[][] Create(Library_SpriteStudio.Script.Root InstanceRoot) 28 | { 29 | return((null == InstanceRoot) ? null : Create(InstanceRoot.DataCellMap.ListDataCellMap)); 30 | } 31 | 32 | /* ******************************************************** */ 33 | //! Create "Cell-Map Change"-Table 34 | /*! 35 | @param ListCellMap 36 | Original "Cell-Map"s 37 | @retval Return-Value 38 | Created "Cell-Map Change"-Table
39 | null == Failure 40 | 41 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.
42 | Caution: The result is referencing data in original "Cell-Map"s. 43 | */ 44 | public static Library_SpriteStudio.Control.CellChange[][] Create(Library_SpriteStudio.Data.CellMap[] ListCellMap) 45 | { 46 | Library_SpriteStudio.Control.CellChange[][] Rv = null; 47 | if(null != ListCellMap) 48 | { 49 | int Count = ListCellMap.Length; 50 | Rv = new Library_SpriteStudio.Control.CellChange[Count][]; 51 | if(null != Rv) 52 | { 53 | for(int i=0; i 71 | null == Failure 72 | 73 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.
74 | Caution: The result is referencing data in original "Cell-Map". 75 | */ 76 | public static Library_SpriteStudio.Control.CellChange[] CellMapCreate(Library_SpriteStudio.Data.CellMap InstanceCellMap, int IndexTexture) 77 | { 78 | Library_SpriteStudio.Control.CellChange[] Rv = null; 79 | if(null != InstanceCellMap) 80 | { 81 | Library_SpriteStudio.Data.Cell DataCell = null; 82 | if(null != InstanceCellMap.ListCell) 83 | { 84 | int Count = InstanceCellMap.ListCell.Length; 85 | Rv = new Library_SpriteStudio.Control.CellChange[Count]; 86 | if(null != Rv) 87 | { 88 | for(int i=0; i 117 | null == Failure 118 | 119 | Create the "Cell-Map Change"-Table on the basis of the initial "Cell-Map" information of the animation data.
120 | Caution: The result is referencing data in initial "Cell-Map". (but "Cell" data is another instance) 121 | */ 122 | public static Library_SpriteStudio.Control.CellChange[][] Copy(Library_SpriteStudio.Script.Root InstanceRoot) 123 | { 124 | return((null == InstanceRoot) ? null : Copy(InstanceRoot.DataCellMap.ListDataCellMap)); 125 | } 126 | 127 | /* ******************************************************** */ 128 | //! Copy "Cell-Map Change"-Table 129 | /*! 130 | @param ListCellMap 131 | Original "Cell-Map"s 132 | @retval Return-Value 133 | Created "Cell-Map Change"-Table
134 | null == Failure 135 | 136 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information of the animation data.
137 | Caution: The result is referencing data in original "Cell-Map"s. (but "Cell" data is another instance) 138 | */ 139 | public static Library_SpriteStudio.Control.CellChange[][] Copy(Library_SpriteStudio.Data.CellMap[] ListCellMap) 140 | { 141 | Library_SpriteStudio.Control.CellChange[][] Rv = null; 142 | if(null != ListCellMap) 143 | { 144 | int Count = ListCellMap.Length; 145 | Rv = new Library_SpriteStudio.Control.CellChange[Count][]; 146 | if(null != Rv) 147 | { 148 | Library_SpriteStudio.Data.CellMap CellMapNew = null; 149 | if(null != CellMapNew) 150 | { 151 | for(int i=0; i 174 | null == Failure 175 | 176 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.
177 | Caution: The result is referencing data in original "Cell-Map". (but "Cell" data is another instance) 178 | */ 179 | public static Library_SpriteStudio.Control.CellChange[] CellMapCopy(Library_SpriteStudio.Data.CellMap InstanceCellMap, int IndexTexture) 180 | { 181 | Library_SpriteStudio.Control.CellChange[] Rv = null; 182 | if(null != InstanceCellMap) 183 | { 184 | Library_SpriteStudio.Data.Cell DataCell = null; 185 | if(null != InstanceCellMap.ListCell) 186 | { 187 | Library_SpriteStudio.Data.Cell DataCellNew = null; 188 | int Count = InstanceCellMap.ListCell.Length; 189 | Rv = new Library_SpriteStudio.Control.CellChange[Count]; 190 | if(null != Rv) 191 | { 192 | for(int i=0; i 223 | null == Failure 224 | 225 | Create the "Cell-Map Change"-Table on the basis of the initial "Cell-Map" information of the animation data.
226 | Caution: The result is another instance from initial "Cell-Map"s. 227 | */ 228 | public static Library_SpriteStudio.Control.CellChange[][] CopyFull(Library_SpriteStudio.Script.Root InstanceRoot) 229 | { 230 | return((null == InstanceRoot) ? null : CopyFull(InstanceRoot.DataCellMap.ListDataCellMap)); 231 | } 232 | 233 | /* ******************************************************** */ 234 | //! Full-Copy "Cell-Map Change"-Table 235 | /*! 236 | @param ListCellMap 237 | Original "Cell-Map"s 238 | @retval Return-Value 239 | Created "Cell-Map Change"-Table
240 | null == Failure 241 | 242 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information of the animation data.
243 | Caution: The result is another instance from original "Cell-Map"s. 244 | */ 245 | public static Library_SpriteStudio.Control.CellChange[][] CopyFull(Library_SpriteStudio.Data.CellMap[] ListCellMap) 246 | { 247 | Library_SpriteStudio.Control.CellChange[][] Rv = null; 248 | if(null != ListCellMap) 249 | { 250 | int Count = ListCellMap.Length; 251 | Rv = new Library_SpriteStudio.Control.CellChange[Count][]; 252 | if(null != Rv) 253 | { 254 | for(int i=0; i 272 | null == Failure 273 | 274 | Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.
275 | Caution: The result is another instance from original "Cell-Map"s. 276 | */ 277 | public static Library_SpriteStudio.Control.CellChange[] CellMapCopyFull(Library_SpriteStudio.Data.CellMap InstanceCellMap, int IndexTexture) 278 | { 279 | Library_SpriteStudio.Control.CellChange[] Rv = null; 280 | if(null != InstanceCellMap) 281 | { 282 | Library_SpriteStudio.Data.Cell DataCell = null; 283 | if(null != InstanceCellMap.ListCell) 284 | { 285 | Library_SpriteStudio.Data.CellMap DataCellMapNew = null; 286 | Library_SpriteStudio.Data.Cell DataCellNew = null; 287 | int Count = InstanceCellMap.ListCell.Length; 288 | Rv = new Library_SpriteStudio.Control.CellChange[Count]; 289 | if(null != Rv) 290 | { 291 | for(int i=0; i 331 | false == Invalid Indexes 332 | 333 | Check Indexes in "Cell-Map Change"-Table. 334 | */ 335 | public static bool TableCheckValidIndex( Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 336 | int IndexCellMap, 337 | int IndexCell 338 | ) 339 | { 340 | if(null == InstanceTableCellChange) 341 | { 342 | return(false); 343 | } 344 | if((0 > IndexCellMap) || (InstanceTableCellChange.Length <= IndexCellMap)) 345 | { 346 | return(false); 347 | } 348 | 349 | if((0 > IndexCell) || (InstanceTableCellChange[IndexCellMap].Length <= IndexCell)) 350 | { 351 | return(false); 352 | } 353 | 354 | return(true); 355 | } 356 | 357 | /* ******************************************************** */ 358 | //! Get Cell's data 359 | /*! 360 | @param Output 361 | Result storage destination 362 | @param InstanceTableCellChange 363 | "Cell-Map Change"-Table 364 | @param IndexCellMap 365 | Index of "Cell-Map" 366 | @param IndexCell 367 | Index of Cell in "Cell-Map" 368 | @retval Return-Value 369 | true == "Output" is valid
370 | false == "Output" is invalid 371 | 372 | Get cell's data in "Cell-Map Change"-Table. 373 | */ 374 | public static bool CellGet( ref Library_SpriteStudio.Control.CellChange Output, 375 | Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 376 | int IndexCellMap, 377 | int IndexCell 378 | ) 379 | { 380 | if(false == TableCheckValidIndex(InstanceTableCellChange, IndexCellMap, IndexCell)) 381 | { 382 | return(false); 383 | } 384 | 385 | Output = InstanceTableCellChange[IndexCellMap][IndexCell]; 386 | return(true); 387 | } 388 | 389 | /* ******************************************************** */ 390 | //! Set Cell's data 391 | /*! 392 | @param InstanceTableCellChange 393 | "Cell-Map Change"-Table 394 | @param IndexCellMap 395 | Index of "Cell-Map" 396 | @param IndexCell 397 | Index of Cell in "Cell-Map" 398 | @param IndexTexture 399 | Index of Texture (in Material-Table) 400 | @param InstanceCellMap 401 | "Cell-Map" Data 402 | @param InstanceCell 403 | Cell Data 404 | @retval Return-Value 405 | true == "Output" is valid
406 | false == "Output" is invalid 407 | 408 | Set cell data in "Cell-Map Change"-Table.
409 | Caution: "InstanceCellMap" and "InstanceCell" are referenced. 410 | */ 411 | public static bool CellSet( Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 412 | int IndexCellMap, 413 | int IndexCell, 414 | int IndexTexture, 415 | Library_SpriteStudio.Data.CellMap InstanceCellMap, 416 | Library_SpriteStudio.Data.Cell InstanceCell 417 | ) 418 | { 419 | if(false == TableCheckValidIndex(InstanceTableCellChange, IndexCellMap, IndexCell)) 420 | { 421 | return(false); 422 | } 423 | 424 | InstanceTableCellChange[IndexCellMap][IndexCell].DataSet(IndexTexture, InstanceCellMap, InstanceCell); 425 | return(true); 426 | } 427 | 428 | /* ******************************************************** */ 429 | //! Set Cell's data 430 | /*! 431 | @param InstanceTableCellChange 432 | "Cell-Map Change"-Table 433 | @param IndexCellMap 434 | Index of "Cell-Map" 435 | @param IndexCell 436 | Index of Cell in "Cell-Map" 437 | @param IndexTexture 438 | Index of Texture (in Material-Table) 439 | @param InstanceCellMap 440 | "Cell-Map" Data 441 | @param InstanceCell 442 | Cell Data 443 | @retval Return-Value 444 | true == "Output" is valid
445 | false == "Output" is invalid 446 | 447 | Set cell data in "Cell-Map Change"-Table.
448 | Caution: Cell data is not referencing "InstanceCellMap" and "InstanceCell". 449 | */ 450 | public static bool CellSetFull( Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 451 | int IndexCellMap, 452 | int IndexCell, 453 | int IndexTexture, 454 | Library_SpriteStudio.Data.CellMap InstanceCellMap, 455 | Library_SpriteStudio.Data.Cell InstanceCell 456 | ) 457 | { 458 | if(false == TableCheckValidIndex(InstanceTableCellChange, IndexCellMap, IndexCell)) 459 | { 460 | return(false); 461 | } 462 | 463 | Library_SpriteStudio.Data.CellMap InstanceCellMapNew = new Library_SpriteStudio.Data.CellMap(); 464 | InstanceCellMapNew.Duplicate(InstanceCellMap); 465 | InstanceCellMapNew.ListCell = null; /* Dis-Use */ 466 | 467 | Library_SpriteStudio.Data.Cell InstanceCellNew = new Library_SpriteStudio.Data.Cell(); 468 | InstanceCellNew.Duplicate(InstanceCell); 469 | 470 | InstanceTableCellChange[IndexCellMap][IndexCell].DataSet(IndexTexture, InstanceCellMapNew, InstanceCellNew); 471 | return(true); 472 | } 473 | 474 | /* ******************************************************** */ 475 | //! Get Cell-Map count 476 | /*! 477 | @param InstanceTableCellChange 478 | "Cell-Map Change"-Table 479 | @retval Return-Value 480 | Count of "Cell-Map"s
481 | -1 == Failure (Error) 482 | 483 | Get count of "Cell-Map"s. 484 | */ 485 | public static int CountGetCellMap(Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange) 486 | { 487 | if(null == InstanceTableCellChange) 488 | { 489 | return(-1); 490 | } 491 | return(InstanceTableCellChange.Length); 492 | } 493 | 494 | /* ******************************************************** */ 495 | //! Get Cell count 496 | /*! 497 | @param InstanceTableCellChange 498 | "Cell-Map Change"-Table 499 | @param IndexCellMap 500 | "Cell-Map"'s Index 501 | @retval Return-Value 502 | Count of "Cell-Map"s
503 | -1 == Failure (Error) 504 | 505 | Get count of Cells in the "Cell-Map". 506 | */ 507 | public static int CountGetCell( Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 508 | int IndexCellMap 509 | ) 510 | { 511 | if(null == InstanceTableCellChange) 512 | { 513 | return(-1); 514 | } 515 | if((0 > IndexCellMap) || (InstanceTableCellChange.Length <= IndexCellMap)) 516 | { 517 | return(-1); 518 | } 519 | return(InstanceTableCellChange[IndexCellMap].Length); 520 | } 521 | 522 | /* ******************************************************** */ 523 | //! Get Cell's Index 524 | /*! 525 | @param InstanceTableCellChange 526 | "Cell-Map Change"-Table 527 | @param IndexCellMap 528 | "Cell-Map"'s Index 529 | @param Name 530 | Cell's Name 531 | @retval Return-Value 532 | Cell's Index
533 | -1 == Not-Found / Failure (Error) 534 | 535 | Get Cell's Index. 536 | */ 537 | public static int IndexGetCell( Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange, 538 | int IndexCellMap, 539 | string Name 540 | ) 541 | { 542 | int CountCell = CountGetCell(InstanceTableCellChange, IndexCellMap); 543 | if(0 >= CountCell) 544 | { 545 | return(-1); 546 | } 547 | 548 | Library_SpriteStudio.Control.CellChange[] InstanceCellMapChanged = InstanceTableCellChange[IndexCellMap]; 549 | string NameCellNow = null; 550 | for(int i=0; i(true, "OPTPiX SpriteStudio Import-Settings"); 63 | SettingGetMenu(); 64 | SettingGetImport(); 65 | } 66 | void OnGUI() 67 | { 68 | int LevelIndent = 0; 69 | 70 | EditorGUI.indentLevel = LevelIndent; 71 | 72 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 73 | FlagMenuFallOutBasic = EditorGUILayout.Foldout(FlagMenuFallOutBasic, "Options for basic"); 74 | if(true == FlagMenuFallOutBasic) 75 | { 76 | EditorGUI.indentLevel = LevelIndent + 1; 77 | 78 | EditorGUILayout.LabelField("-Animation Data"); 79 | EditorGUI.indentLevel = LevelIndent + 2; 80 | FlagDataCalculateInAdvance = EditorGUILayout.Toggle("Calculate in advance", FlagDataCalculateInAdvance); 81 | EditorGUILayout.LabelField(" Deformations of \"Mesh\" and \"Collider\" are calculated at importing."); 82 | EditorGUILayout.LabelField(" Checked: Improving execution speed of the runtime."); 83 | EditorGUILayout.LabelField(" Unchecked: The data size is reduced."); 84 | EditorGUILayout.Space(); 85 | 86 | FlagDataCompress = EditorGUILayout.Toggle("Compress", FlagDataCompress); 87 | EditorGUILayout.LabelField(" Compress animation data at importing."); 88 | EditorGUILayout.LabelField(" Checked: Compress."); 89 | EditorGUILayout.LabelField(" Unchecked: Uncompress. CPU-Load is reduced."); 90 | EditorGUILayout.Space(); 91 | EditorGUI.indentLevel = LevelIndent + 1; 92 | EditorGUILayout.Space(); 93 | 94 | EditorGUILayout.LabelField("-Cell Data"); 95 | EditorGUI.indentLevel = LevelIndent + 2; 96 | FlagDataCellTrimTransparentPixels = EditorGUILayout.Toggle("Trim transparent-pixels", FlagDataCellTrimTransparentPixels); 97 | EditorGUILayout.LabelField(" Adjust the cells' size so that"); 98 | EditorGUILayout.LabelField(" unnecessary transparent-pixels are not drawn."); 99 | EditorGUILayout.LabelField(" When checked, some functions"); 100 | EditorGUILayout.LabelField(" may not produce the intended result."); 101 | 102 | EditorGUILayout.Space(); 103 | EditorGUI.indentLevel = LevelIndent + 1; 104 | 105 | EditorGUILayout.LabelField("-Others"); 106 | EditorGUI.indentLevel = LevelIndent + 2; 107 | FlagAttachControlGameObject = EditorGUILayout.Toggle("Create Control-Prefab", FlagAttachControlGameObject); 108 | EditorGUILayout.LabelField(" \"Control-Prefab\" is GameObject attached the script"); 109 | EditorGUILayout.LabelField(" for Auto-Instantiate Body-Prefab (\"Script_SpriteStudio_ControlPrefab.cs\")."); 110 | EditorGUILayout.Space(); 111 | 112 | FlagCreateProjectFolder = EditorGUILayout.Toggle("Create Project Folder", FlagCreateProjectFolder); 113 | EditorGUILayout.Space(); 114 | 115 | FlagDataTakeOverSettingPrefab = EditorGUILayout.Toggle("Take over setting", FlagDataTakeOverSettingPrefab); 116 | EditorGUILayout.LabelField(" Takes over the setting of \"Script_SpriteStudio_Root\""); 117 | EditorGUILayout.LabelField(" and \"Script_SpriteStudio_RootEffect\" in Prefabs."); 118 | EditorGUILayout.Space(); 119 | EditorGUI.indentLevel = LevelIndent + 1; 120 | 121 | EditorGUI.indentLevel = LevelIndent; 122 | } 123 | EditorGUILayout.Space(); 124 | 125 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 126 | FlagMenuFallOutNaming = EditorGUILayout.Foldout(FlagMenuFallOutNaming, "Options for Naming Assets"); 127 | if(true == FlagMenuFallOutNaming) 128 | { 129 | EditorGUI.indentLevel = LevelIndent + 1; 130 | 131 | FlagNameDataRuleOld = EditorGUILayout.Toggle("Naming Old Rule", FlagNameDataRuleOld); 132 | EditorGUILayout.LabelField(" Difference in naming of datas."); 133 | EditorGUILayout.LabelField(" Checked: Conpatible with up to Ver.1.2.x."); 134 | EditorGUILayout.LabelField(" Unchecked: Contain SubFolder-Name in Data-Name."); 135 | EditorGUILayout.Space(); 136 | 137 | FlagNameDataAttachSpecific = EditorGUILayout.Toggle("Naming to add prefix", FlagNameDataAttachSpecific); 138 | EditorGUILayout.LabelField(" So that the Asset-Name does not conflict when stored in"); 139 | EditorGUILayout.LabelField(" the Asset-Bundle, add the data identification string to the top."); 140 | EditorGUILayout.LabelField(" Checked: Add prefix in the name."); 141 | EditorGUILayout.LabelField(" Unchecked: Add nothing."); 142 | EditorGUILayout.Space(); 143 | if(true == FlagNameDataAttachSpecific) 144 | { 145 | EditorGUI.indentLevel = LevelIndent + 2; 146 | FlagNameDataAttachSpecificSSPJ = EditorGUILayout.Toggle("Add SSPJ-Name", FlagNameDataAttachSpecificSSPJ); 147 | EditorGUILayout.LabelField(" Checked: Prifix is \"xx_" + NameAssetSSPJ + "_\" or \"" + NameAssetSSPJ + "_\""); 148 | EditorGUILayout.LabelField(" Unchecked: Prifix is \"xx_\" or no-prefix"); 149 | EditorGUILayout.Space(); 150 | 151 | FlagNameDataAttachSpecificToPrefab = EditorGUILayout.Toggle("Apply to Prefabs", FlagNameDataAttachSpecificToPrefab); 152 | // FlagNameDataAttachSpecificToCellMap = EditorGUILayout.Toggle("Apply to CellMap", FlagNameDataAttachSpecificToCellMap); 153 | FlagNameDataAttachSpecificToTexture = EditorGUILayout.Toggle("Apply to Textures", FlagNameDataAttachSpecificToTexture); 154 | EditorGUILayout.Space(); 155 | EditorGUI.indentLevel = LevelIndent + 1; 156 | } 157 | 158 | FlagMenuFallOutNamingSample = EditorGUILayout.Foldout(FlagMenuFallOutNamingSample, "State of Assets-Naming"); 159 | if(true == FlagMenuFallOutNamingSample) 160 | { 161 | EditorGUI.indentLevel = LevelIndent + 2; 162 | 163 | string Name; 164 | Name = NameAssetBody; 165 | if(true == FlagNameDataAttachSpecific) 166 | { 167 | if(true == FlagNameDataAttachSpecificToPrefab) 168 | { 169 | if(true == FlagNameDataAttachSpecificSSPJ) 170 | { 171 | Name = NameAssetSSPJ + "_" + Name; 172 | } 173 | } 174 | } 175 | EditorGUILayout.LabelField("Prefab-Animation: " + Name); 176 | 177 | Name = NameAssetBody; 178 | if(true == FlagNameDataAttachSpecific) 179 | { 180 | if(true == FlagNameDataAttachSpecificToPrefab) 181 | { 182 | if(true == FlagNameDataAttachSpecificSSPJ) 183 | { 184 | Name = LibraryEditor_SpriteStudio.NamePrefixPrefabEffect + NameAssetSSPJ + "_" + Name; 185 | } 186 | else 187 | { 188 | Name = LibraryEditor_SpriteStudio.NamePrefixPrefabEffect + Name; 189 | } 190 | } 191 | } 192 | EditorGUILayout.LabelField("Prefab-Effect: " + Name); 193 | 194 | Name = NameAssetBody; 195 | if(true == FlagNameDataAttachSpecific) 196 | { 197 | if(true == FlagNameDataAttachSpecificSSPJ) 198 | { 199 | Name = LibraryEditor_SpriteStudio.NamePrefixAnimation + NameAssetSSPJ + "_" + Name; 200 | } 201 | else 202 | { 203 | Name = LibraryEditor_SpriteStudio.NamePrefixAnimation + Name; 204 | } 205 | } 206 | EditorGUILayout.LabelField("Data-Animation: " + Name); 207 | 208 | Name = NameAssetBody; 209 | if(true == FlagNameDataAttachSpecific) 210 | { 211 | if(true == FlagNameDataAttachSpecificSSPJ) 212 | { 213 | Name = LibraryEditor_SpriteStudio.NamePrefixEffect + NameAssetSSPJ + "_" + Name; 214 | } 215 | else 216 | { 217 | Name = LibraryEditor_SpriteStudio.NamePrefixEffect + Name; 218 | } 219 | } 220 | EditorGUILayout.LabelField("Data-Effect: " + Name); 221 | 222 | // Name = NameAssetBody; 223 | // if(true == FlagNameDataAttachSpecific) 224 | // { 225 | // if(true == FlagNameDataAttachSpecificToCellMap) 226 | // { 227 | // if(true == FlagNameDataAttachSpecificSSPJ) 228 | // { 229 | // Name = NameAssetSSPJ; 230 | // } 231 | // } 232 | // } 233 | Name = NameAssetSSPJ; 234 | EditorGUILayout.LabelField("CellMap: " + Name); 235 | 236 | Name = NameAssetBody; 237 | if(true == FlagNameDataAttachSpecific) 238 | { 239 | if(true == FlagNameDataAttachSpecificSSPJ) 240 | { 241 | Name = LibraryEditor_SpriteStudio.NamePrefixMaterial + NameAssetSSPJ + "_" + Name; 242 | } 243 | else 244 | { 245 | Name = LibraryEditor_SpriteStudio.NamePrefixMaterial + Name; 246 | } 247 | } 248 | EditorGUILayout.LabelField("Material-Animation: " + Name); 249 | 250 | Name = NameAssetBody; 251 | if(true == FlagNameDataAttachSpecific) 252 | { 253 | if(true == FlagNameDataAttachSpecificSSPJ) 254 | { 255 | Name = LibraryEditor_SpriteStudio.NamePrefixMaterialEffect + NameAssetSSPJ + "_" + Name; 256 | } 257 | else 258 | { 259 | Name = LibraryEditor_SpriteStudio.NamePrefixMaterialEffect + Name; 260 | } 261 | } 262 | EditorGUILayout.LabelField("Material-Effect: " + Name); 263 | 264 | Name = NameAssetBody; 265 | if(true == FlagNameDataAttachSpecific) 266 | { 267 | if(true == FlagNameDataAttachSpecificToTexture) 268 | { 269 | if(true == FlagNameDataAttachSpecificSSPJ) 270 | { 271 | Name = NameAssetSSPJ + "_" + Name; 272 | } 273 | } 274 | } 275 | EditorGUILayout.LabelField("Texture: " + Name); 276 | 277 | EditorGUILayout.Space(); 278 | EditorGUI.indentLevel = LevelIndent + 1; 279 | } 280 | 281 | EditorGUI.indentLevel = LevelIndent; 282 | } 283 | EditorGUILayout.Space(); 284 | 285 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 286 | FlagMenuFallOutCollider = EditorGUILayout.Foldout(FlagMenuFallOutCollider, "Options for \"Collider\""); 287 | if(true == FlagMenuFallOutCollider) 288 | { 289 | EditorGUI.indentLevel = LevelIndent + 1; 290 | 291 | CollisionThicknessZ = EditorGUILayout.FloatField("Collider-Thickness", CollisionThicknessZ); 292 | EditorGUILayout.LabelField(" (Local Z-Axis Width)"); 293 | EditorGUILayout.Space(); 294 | 295 | FlagAttachRigidBody = EditorGUILayout.Toggle("Attach Rigid-Body", FlagAttachRigidBody); 296 | EditorGUILayout.LabelField(" to Collider"); 297 | EditorGUILayout.Space(); 298 | 299 | EditorGUI.indentLevel = LevelIndent; 300 | } 301 | EditorGUILayout.Space(); 302 | 303 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 304 | FlagMenuFallOutOverwrite = EditorGUILayout.Foldout(FlagMenuFallOutOverwrite, "Options for Confirm-Overwrite"); 305 | if(true == FlagMenuFallOutOverwrite) 306 | { 307 | EditorGUI.indentLevel = LevelIndent + 1; 308 | 309 | FlagConfirmOverWrite = EditorGUILayout.Toggle("Confirm Overwrite", FlagConfirmOverWrite); 310 | EditorGUILayout.Space(); 311 | 312 | if(true == FlagConfirmOverWrite) 313 | { 314 | EditorGUI.indentLevel = LevelIndent + 2; 315 | 316 | EditorGUILayout.LabelField("Additional options: Overwrite-check for individual data types."); 317 | EditorGUILayout.LabelField(" Unchecked: No confirm."); 318 | EditorGUILayout.Space(); 319 | 320 | FlagConfirmOverWriteRoot = EditorGUILayout.Toggle("Root", FlagConfirmOverWriteRoot); 321 | EditorGUILayout.Space(); 322 | 323 | FlagConfirmOverWriteRootEffect = EditorGUILayout.Toggle("Root-Effect", FlagConfirmOverWriteRootEffect); 324 | EditorGUILayout.Space(); 325 | 326 | FlagConfirmOverWriteDataCellMap = EditorGUILayout.Toggle("Fixed-CellMap Data", FlagConfirmOverWriteDataCellMap); 327 | EditorGUILayout.Space(); 328 | 329 | FlagConfirmOverWriteDataAnimation = EditorGUILayout.Toggle("Fixed-Animation Data", FlagConfirmOverWriteDataAnimation); 330 | EditorGUILayout.Space(); 331 | 332 | FlagConfirmOverWriteDataEffect = EditorGUILayout.Toggle("Fixed-Effect Data", FlagConfirmOverWriteDataEffect); 333 | EditorGUILayout.Space(); 334 | 335 | FlagConfirmOverWriteMaterial = EditorGUILayout.Toggle("Material", FlagConfirmOverWriteMaterial); 336 | EditorGUILayout.Space(); 337 | 338 | FlagConfirmOverWriteTexture = EditorGUILayout.Toggle("Texture", FlagConfirmOverWriteTexture); 339 | EditorGUILayout.Space(); 340 | 341 | EditorGUI.indentLevel = LevelIndent + 1; 342 | } 343 | 344 | EditorGUI.indentLevel = LevelIndent; 345 | } 346 | EditorGUILayout.Space(); 347 | 348 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 349 | FlagMenuFallOutAsset = EditorGUILayout.Foldout(FlagMenuFallOutAsset, "Options for Tracking-Assets"); 350 | if(true == FlagMenuFallOutAsset) 351 | { 352 | EditorGUI.indentLevel = LevelIndent + 1; 353 | 354 | EditorGUILayout.LabelField("Track assets location from reference data"); 355 | EditorGUILayout.LabelField(" Unchecked: Generate deterrmined path-name to create assets."); 356 | EditorGUILayout.Space(); 357 | 358 | FlagGetCellMapReferencedPartsRoot = EditorGUILayout.Toggle("Fixed-CellMapData", FlagGetCellMapReferencedPartsRoot); 359 | EditorGUILayout.Space(); 360 | 361 | FlagGetAnimationReferencedPartsRoot = EditorGUILayout.Toggle("Fixed-Animation Data", FlagGetAnimationReferencedPartsRoot); 362 | EditorGUILayout.Space(); 363 | 364 | FlagGetEffectReferencedPartsRoot = EditorGUILayout.Toggle("Fixed-Effect Data", FlagGetEffectReferencedPartsRoot); 365 | EditorGUILayout.Space(); 366 | 367 | FlagGetMaterialPartsRoot = EditorGUILayout.Toggle("Material", FlagGetMaterialPartsRoot); 368 | EditorGUILayout.Space(); 369 | 370 | FlagGetTextureMaterial = EditorGUILayout.Toggle("Texture (from Material)", FlagGetTextureMaterial); 371 | EditorGUILayout.Space(); 372 | 373 | EditorGUI.indentLevel = LevelIndent; 374 | } 375 | EditorGUILayout.Space(); 376 | 377 | GUILayout.Box("", GUILayout.Width(this.position.width), GUILayout.Height(1)); 378 | EditorGUILayout.Space(); 379 | if(true == GUILayout.Button("Import")) 380 | { 381 | SettingSetMenu(); 382 | 383 | LibraryEditor_SpriteStudio.SettingImport SettingImport; 384 | SettingImport.FlagNameDataRuleOld = FlagNameDataRuleOld; 385 | SettingImport.FlagNameDataAttachSpecific = FlagNameDataAttachSpecific; 386 | SettingImport.FlagNameDataAttachSpecificToPrefab = FlagNameDataAttachSpecificToPrefab; 387 | // SettingImport.FlagNameDataAttachSpecificToCellMap = FlagNameDataAttachSpecificToCellMap; 388 | SettingImport.FlagNameDataAttachSpecificToTexture = FlagNameDataAttachSpecificToTexture; 389 | SettingImport.FlagNameDataAttachSpecificSSPJ = FlagNameDataAttachSpecificSSPJ; 390 | SettingImport.TextureSizePixelMaximum = TextureSizePixelMaximum; 391 | SettingImport.FlagAttachControlGameObject = FlagAttachControlGameObject; 392 | SettingImport.FlagCreateProjectFolder = FlagCreateProjectFolder; 393 | SettingImport.FlagDataCalculateInAdvance = FlagDataCalculateInAdvance; 394 | SettingImport.FlagDataCompress = FlagDataCompress; 395 | SettingImport.FlagDataTakeOverSettingPrefab = FlagDataTakeOverSettingPrefab; 396 | SettingImport.FlagDataCellTrimTransparentPixels = FlagDataCellTrimTransparentPixels; 397 | 398 | SettingImport.CollisionThicknessZ = CollisionThicknessZ; 399 | SettingImport.FlagAttachRigidBody = FlagAttachRigidBody; 400 | 401 | SettingImport.FlagConfirmOverWrite = FlagConfirmOverWrite; 402 | SettingImport.FlagConfirmOverWriteRoot = FlagConfirmOverWriteRoot; 403 | SettingImport.FlagConfirmOverWriteRootEffect = FlagConfirmOverWriteRootEffect; 404 | SettingImport.FlagConfirmOverWriteDataCellMap = FlagConfirmOverWriteDataCellMap; 405 | SettingImport.FlagConfirmOverWriteDataAnimation = FlagConfirmOverWriteDataAnimation; 406 | SettingImport.FlagConfirmOverWriteDataEffect = FlagConfirmOverWriteDataEffect; 407 | SettingImport.FlagConfirmOverWriteMaterial = FlagConfirmOverWriteMaterial; 408 | SettingImport.FlagConfirmOverWriteTexture = FlagConfirmOverWriteTexture; 409 | 410 | SettingImport.FlagGetAnimationReferencedPartsRoot = FlagGetAnimationReferencedPartsRoot; 411 | SettingImport.FlagGetCellMapReferencedPartsRoot = FlagGetCellMapReferencedPartsRoot; 412 | SettingImport.FlagGetEffectReferencedPartsRoot = FlagGetEffectReferencedPartsRoot; 413 | SettingImport.FlagGetMaterialPartsRoot = FlagGetMaterialPartsRoot; 414 | SettingImport.FlagGetTextureMaterial = FlagGetTextureMaterial; 415 | 416 | LibraryEditor_SpriteStudio.Menu.ImportSSPJ(SettingImport); 417 | 418 | Close(); 419 | } 420 | EditorGUILayout.Space(); 421 | if(true == GUILayout.Button("Default Configuration")) 422 | { 423 | LibraryEditor_SpriteStudio.Menu.SettingClearImport(); 424 | SettingGetImport(); 425 | } 426 | } 427 | private static void SettingGetMenu() 428 | { 429 | FlagMenuFallOutBasic = EditorPrefs.GetBool(PrefsKeyFallOutBasic, false); 430 | FlagMenuFallOutNaming = EditorPrefs.GetBool(PrefsKeyFallOutNaming, false); 431 | FlagMenuFallOutNaming = EditorPrefs.GetBool(PrefsKeyFallOutNamingSample, false); 432 | FlagMenuFallOutOverwrite = EditorPrefs.GetBool(PrefsKeyFallOutOverwrite, false); 433 | FlagMenuFallOutAsset = EditorPrefs.GetBool(PrefsKeyFallOutAsset, false); 434 | FlagMenuFallOutCollider = EditorPrefs.GetBool(PrefsKeyFallOutCollider, false); 435 | } 436 | private static void SettingSetMenu() 437 | { 438 | EditorPrefs.SetBool(PrefsKeyFallOutBasic, FlagMenuFallOutBasic); 439 | EditorPrefs.SetBool(PrefsKeyFallOutNaming, FlagMenuFallOutNaming); 440 | EditorPrefs.SetBool(PrefsKeyFallOutNaming, FlagMenuFallOutNamingSample); 441 | EditorPrefs.SetBool(PrefsKeyFallOutOverwrite, FlagMenuFallOutOverwrite); 442 | EditorPrefs.SetBool(PrefsKeyFallOutAsset, FlagMenuFallOutAsset); 443 | EditorPrefs.SetBool(PrefsKeyFallOutCollider, FlagMenuFallOutCollider); 444 | } 445 | private static void SettingGetImport() 446 | { 447 | LibraryEditor_SpriteStudio.SettingImport SettingImport; 448 | LibraryEditor_SpriteStudio.Menu.SettingGetImport(out SettingImport); 449 | 450 | FlagNameDataRuleOld = SettingImport.FlagNameDataRuleOld; 451 | FlagNameDataAttachSpecific = SettingImport.FlagNameDataAttachSpecific; 452 | FlagNameDataAttachSpecificToTexture = SettingImport.FlagNameDataAttachSpecificToTexture; 453 | // FlagNameDataAttachSpecificToCellMap = SettingImport.FlagNameDataAttachSpecificToCellMap; 454 | FlagNameDataAttachSpecificToPrefab = SettingImport.FlagNameDataAttachSpecificToPrefab; 455 | FlagNameDataAttachSpecificSSPJ = SettingImport.FlagNameDataAttachSpecificSSPJ; 456 | TextureSizePixelMaximum = SettingImport.TextureSizePixelMaximum; 457 | FlagAttachControlGameObject = SettingImport.FlagAttachControlGameObject; 458 | FlagCreateProjectFolder = SettingImport.FlagCreateProjectFolder; 459 | FlagDataCalculateInAdvance = SettingImport.FlagDataCalculateInAdvance; 460 | FlagDataCompress = SettingImport.FlagDataCompress; 461 | FlagDataTakeOverSettingPrefab = SettingImport.FlagDataTakeOverSettingPrefab; 462 | 463 | CollisionThicknessZ = SettingImport.CollisionThicknessZ; 464 | FlagAttachRigidBody = SettingImport.FlagAttachRigidBody; 465 | 466 | FlagConfirmOverWrite = SettingImport.FlagConfirmOverWrite; 467 | FlagConfirmOverWriteRoot = SettingImport.FlagConfirmOverWriteRoot; 468 | FlagConfirmOverWriteRootEffect = SettingImport.FlagConfirmOverWriteRootEffect; 469 | FlagConfirmOverWriteDataCellMap = SettingImport.FlagConfirmOverWriteDataCellMap; 470 | FlagConfirmOverWriteDataAnimation = SettingImport.FlagConfirmOverWriteDataAnimation; 471 | FlagConfirmOverWriteDataEffect = SettingImport.FlagConfirmOverWriteDataEffect; 472 | FlagConfirmOverWriteMaterial = SettingImport.FlagConfirmOverWriteMaterial; 473 | FlagConfirmOverWriteTexture = SettingImport.FlagConfirmOverWriteTexture; 474 | 475 | FlagGetAnimationReferencedPartsRoot = SettingImport.FlagGetAnimationReferencedPartsRoot; 476 | FlagGetCellMapReferencedPartsRoot = SettingImport.FlagGetCellMapReferencedPartsRoot; 477 | FlagGetEffectReferencedPartsRoot = SettingImport.FlagGetEffectReferencedPartsRoot; 478 | FlagGetMaterialPartsRoot = SettingImport.FlagGetMaterialPartsRoot; 479 | FlagGetTextureMaterial = SettingImport.FlagGetTextureMaterial; 480 | } 481 | 482 | [MenuItem("Tools/SpriteStudio/About")] 483 | static void About() 484 | { 485 | string VersionText = "1.6.0"; 486 | EditorUtility.DisplayDialog( "SpriteStudio 5 Player for Unity", 487 | "Version: " + VersionText 488 | + "\n\n" 489 | + "Copyright(C) Web Technology Corp.", 490 | "OK" 491 | ); 492 | } 493 | } 494 | --------------------------------------------------------------------------------