├── dist
└── .gitkeep
├── UnityProject_Sagiri
├── Assets
│ ├── Sagiri
│ │ ├── Sagiri.asmdef
│ │ ├── Sagiri.asmdef.meta
│ │ ├── Editor
│ │ │ ├── Tests.meta
│ │ │ ├── Tests
│ │ │ │ ├── SagiriTests.asmdef.meta
│ │ │ │ ├── JsonWriterTest.cs.meta
│ │ │ │ ├── SagiriTests.asmdef
│ │ │ │ └── JsonWriterTest.cs
│ │ │ ├── EntryPoint.cs.meta
│ │ │ ├── PackageExporter.cs.meta
│ │ │ ├── ShowOnlyDrawer.cs.meta
│ │ │ ├── EnvironmentReader.cs.meta
│ │ │ ├── ShowOnlyDrawer.cs
│ │ │ ├── EnvironmentReader.cs
│ │ │ ├── EntryPoint.cs
│ │ │ └── PackageExporter.cs
│ │ ├── Examples
│ │ │ ├── SagiriExample.unity.meta
│ │ │ ├── Editor.meta
│ │ │ ├── Main.cs.meta
│ │ │ ├── GameObjectExamples.cs.meta
│ │ │ ├── Editor
│ │ │ │ ├── MyBuildProcessor.cs.meta
│ │ │ │ └── MyBuildProcessor.cs
│ │ │ ├── Main.cs
│ │ │ ├── GameObjectExamples.cs
│ │ │ └── SagiriExample.unity
│ │ ├── Editor.meta
│ │ ├── Examples.meta
│ │ ├── Prefabs.meta
│ │ ├── ShowOnlyAttribute.cs
│ │ ├── Prefabs
│ │ │ ├── SagiriServer.prefab.meta
│ │ │ └── SagiriServer.prefab
│ │ ├── Console.cs.meta
│ │ ├── Server.cs.meta
│ │ ├── Shell.cs.meta
│ │ ├── Attributes.cs.meta
│ │ ├── CommandTree.cs.meta
│ │ ├── Extensions.cs.meta
│ │ ├── JsonWriter.cs.meta
│ │ ├── LogEntry.cs.meta
│ │ ├── ShowOnlyAttribute.cs.meta
│ │ ├── Attributes.cs
│ │ ├── LogEntry.cs
│ │ ├── Console.cs
│ │ ├── Extensions.cs
│ │ ├── JsonWriter.cs
│ │ ├── CommandTree.cs
│ │ ├── Shell.cs
│ │ └── Server.cs
│ ├── StreamingAssets
│ │ ├── Sagiri
│ │ │ ├── favicon.ico
│ │ │ ├── console.css.meta
│ │ │ ├── console.js.meta
│ │ │ ├── favicon.ico.meta
│ │ │ ├── index.html.meta
│ │ │ ├── shell.css.meta
│ │ │ ├── shell.html.meta
│ │ │ ├── shell.js.meta
│ │ │ ├── console.html.meta
│ │ │ ├── index.html
│ │ │ ├── shell.css
│ │ │ ├── shell.html
│ │ │ ├── shell.js
│ │ │ ├── console.css
│ │ │ ├── console.html
│ │ │ └── console.js
│ │ └── Sagiri.meta
│ ├── Sagiri.meta
│ └── StreamingAssets.meta
├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── VFXManager.asset
│ ├── ClusterInputManager.asset
│ ├── PresetManager.asset
│ ├── NetworkManager.asset
│ ├── TimeManager.asset
│ ├── EditorBuildSettings.asset
│ ├── AudioManager.asset
│ ├── EditorSettings.asset
│ ├── TagManager.asset
│ ├── DynamicsManager.asset
│ ├── UnityConnectSettings.asset
│ ├── Physics2DSettings.asset
│ ├── NavMeshAreas.asset
│ ├── GraphicsSettings.asset
│ ├── QualitySettings.asset
│ ├── InputManager.asset
│ └── ProjectSettings.asset
└── Packages
│ └── manifest.json
├── document
├── log-browser.png
└── log-unity.png
├── .editorconfig
├── export_package.bat
├── export_package.sh
├── .travis.yml
├── .gitignore
├── LICENSE
├── README.md
└── scripts
└── install.sh
/dist/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Sagiri.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Sagiri"
3 | }
4 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.3.0f2
2 |
--------------------------------------------------------------------------------
/document/log-browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5minlab/sagiri/HEAD/document/log-browser.png
--------------------------------------------------------------------------------
/document/log-unity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5minlab/sagiri/HEAD/document/log-unity.png
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5minlab/sagiri/HEAD/UnityProject_Sagiri/ProjectSettings/VFXManager.asset
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5minlab/sagiri/HEAD/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/favicon.ico
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Sagiri.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f51ad5bf12dabb24cb29b34df49b1e8c
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4566039f8812efa4e90ca7447f1927d4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/Tests/SagiriTests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bd51e2094633cd46aabea63bb07ad43
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/console.css.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1918f5198f3d65945b2d9fa322e27a00
3 | timeCreated: 1499750605
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/console.js.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61b2f8bff05c74c49b7c449d68338dad
3 | timeCreated: 1499821840
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/favicon.ico.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ac3ce64aad4b804dbd7797f1fbe966a
3 | timeCreated: 1499750605
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/index.html.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24fff50ceef367f40af230185257ea5e
3 | timeCreated: 1500344702
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/shell.css.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3cd8f63ea63d75408fa6b256015e1c4
3 | timeCreated: 1500345812
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/shell.html.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7bd7a1aef771b6346b0ee97bb1f3a900
3 | timeCreated: 1500344702
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/shell.js.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ba8aa1e1bb09bcb4a8ff3abfa1ffc8d8
3 | timeCreated: 1500347234
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6aecb308b2f4694ea4b4595530dedc3
3 | folderAsset: yes
4 | timeCreated: 1499761209
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/SagiriExample.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e46c92d691acdec41bc9921a9d711fb5
3 | timeCreated: 1499761242
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/console.html.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7f94fd22a68cef40b882fee695fcf03
3 | timeCreated: 1499750605
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 80d46eeaf62f12d4d9beb64183caacc2
3 | folderAsset: yes
4 | timeCreated: 1499761631
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d429869b65c292047bfcbe2c21836a40
3 | folderAsset: yes
4 | timeCreated: 1499761294
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d243fe2c843a26e429cc2ddc1281a7b1
3 | folderAsset: yes
4 | timeCreated: 1499761881
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7569fd165a9488f418fe8526e60661a4
3 | folderAsset: yes
4 | timeCreated: 1499761429
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c7b2e4ef2dcf0c44b42ffb25ed93bee
3 | folderAsset: yes
4 | timeCreated: 1500534571
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e6c7c9319b8758640aa9fbf37dc5acf3
3 | folderAsset: yes
4 | timeCreated: 1499761838
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/ShowOnlyAttribute.cs:
--------------------------------------------------------------------------------
1 | // http://answers.unity3d.com/questions/489942/how-to-make-a-readonly-property-in-inspector.html
2 |
3 | namespace Assets.Sagiri {
4 | using UnityEngine;
5 |
6 | public class ShowOnlyAttribute : PropertyAttribute {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Prefabs/SagiriServer.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 921f21092a415734da4892e17f535113
3 | timeCreated: 1499750605
4 | licenseType: Free
5 | NativeFormatImporter:
6 | mainObjectFileID: -1
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Sagiri/Examples/SagiriExample.unity
10 | guid: e46c92d691acdec41bc9921a9d711fb5
11 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Console.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea5920d45dca49040aec80b2f51a3c65
3 | timeCreated: 1499761634
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Server.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f8f10e2c123fa384dba52280f85879f7
3 | timeCreated: 1499761752
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Shell.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 89d7ed848b4ce594f90bf41b53339efe
3 | timeCreated: 1500347234
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Attributes.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f814bca8062fef8458b859b73bf2e34b
3 | timeCreated: 1499761634
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/CommandTree.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d7e76d2d7db35b4183ea5424dbc9e33
3 | timeCreated: 1500347234
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Extensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8663e18829f88884ab9e93b06ade795b
3 | timeCreated: 1499761634
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/JsonWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ff0def8588e3a149ae6bdf50367a8cd
3 | timeCreated: 1500341230
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/LogEntry.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf6d95801b7d626458fc9fdae79b891e
3 | timeCreated: 1499827058
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/EntryPoint.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2e1e19c020bde8f4d8b739b8615442d1
3 | timeCreated: 1499821965
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/Main.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8e5d2b1578161fe468f98cd3b9ee0ab5
3 | timeCreated: 1499761304
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/ShowOnlyAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b961837397500b64a91a2da8bf105d90
3 | timeCreated: 1501034517
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/PackageExporter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ece91cccd538650438d9ee7a55dda64d
3 | timeCreated: 1499761634
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/ShowOnlyDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f18be406cde746045bc62e4593fbaf82
3 | timeCreated: 1501034517
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/EnvironmentReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 577fc73204d47a540bee4f58dcff05f4
3 | timeCreated: 1499821965
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/Tests/JsonWriterTest.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b343770662e57c442b18f4f0f0aa4074
3 | timeCreated: 1500340931
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/GameObjectExamples.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5abdef743642b9b4cabe680680314728
3 | timeCreated: 1499750605
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/Editor/MyBuildProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17364a9d7d2b13849906ec49fb6e3d01
3 | timeCreated: 1500534580
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 |
8 | [*.cs]
9 | indent_style = space
10 | indent_size = 4
11 |
12 |
13 | [*.js]
14 | indent_style = space
15 | indent_size = 2
16 |
17 | [*.css]
18 | indent_style = space
19 | indent_size = 2
20 |
21 | [*.html]
22 | indent_style = space
23 | indent_size = 2
24 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sagiri
4 |
5 |
6 |
7 |
8 | Sagiri
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_DisableAudio: 0
16 | m_VirtualizeEffects: 1
17 |
--------------------------------------------------------------------------------
/export_package.bat:
--------------------------------------------------------------------------------
1 | @set CURR_DIR=%~dp0
2 | @set UNITY_PATH="C:\\Program Files\\Unity-5.6.2p3\\Editor\\Unity.exe"
3 | @set PROJ_PATH=%CURR_DIR%\UnityProject_Sagiri
4 | @set EXPORT_DIR=%CURR_DIR%\dist
5 | @set METHOD=Assets.Sagiri.Editor.EntryPoint.ExportPackage
6 | @set PACKAGE_NAME=sagiri.unitypackage
7 | @set EXPORT_PATH=%EXPORT_DIR%\%PACKAGE_NAME%
8 |
9 | %UNITY_PATH% -quit -batchmode -nographics -silent-crashes -projectPath %PROJ_PATH% -executeMethod %METHOD% -logFile export.log
10 |
--------------------------------------------------------------------------------
/export_package.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | CURR_DIR=`pwd`
4 | UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
5 | PROJ_PATH=$CURR_DIR/UnityProject_Sagiri
6 | EXPORT_DIR=$CURR_DIR/dist
7 | METHOD=Assets.Sagiri.Editor.EntryPoint.ExportPackage
8 | PACKAGE_NAME=minamo.unitypackage
9 | export EXPORT_PATH=$EXPORT_DIR/$PACKAGE_NAME
10 |
11 | LOG_FILE=export.log
12 |
13 | $UNITY_PATH -quit -batchmode -nographics -silent-crashes -projectPath $PROJ_PATH -executeMethod $METHOD -logFile $LOG_FILE
14 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/Tests/SagiriTests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SagiriTests",
3 | "references": [
4 | "Sagiri"
5 | ],
6 | "optionalUnityReferences": [
7 | "TestAssemblies"
8 | ],
9 | "includePlatforms": [
10 | "Editor"
11 | ],
12 | "excludePlatforms": [],
13 | "allowUnsafeCode": false,
14 | "overrideReferences": false,
15 | "precompiledReferences": [],
16 | "autoReferenced": true,
17 | "defineConstraints": []
18 | }
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_DefaultBehaviorMode: 0
10 | m_SpritePackerMode: 0
11 | m_SpritePackerPaddingPower: 1
12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
13 | m_ProjectGenerationRootNamespace:
14 | m_UserGeneratedProjectSuffix:
15 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: required
2 |
3 | os: osx
4 | osx_image: xcode8.3
5 |
6 | cache:
7 | directories:
8 | - scripts/unity-installers/
9 |
10 | before_install:
11 | - chmod a+x ./*.sh
12 | - chmod a+x ./scripts/*.sh
13 | - mkdir -p scripts/unity-installers/
14 |
15 | install:
16 | # unity editor
17 | - cd scripts; ./install.sh editor; cd -
18 |
19 | script:
20 | - ./export_package.sh
21 | - ls -al ./dist
22 |
23 | after_script:
24 | - cat export.log
25 |
26 | notifications:
27 | email: false
28 |
29 | branches:
30 | only:
31 | - master
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/shell.css:
--------------------------------------------------------------------------------
1 | textarea {
2 | resize:none;
3 | }
4 |
5 | body.console {
6 | background-color:black;
7 | }
8 | textarea.console {
9 | width:100%;
10 | background-color:#383838;
11 | color:#F0F0F0;
12 | font-size: 14px;
13 | font-family: "Lucida Console", Monaco, monospace;
14 | line-height: 16px;
15 | }
16 |
17 | h1 {
18 | margin: 5px;
19 | }
20 | a, a:visited, a:hover {
21 | text-decoration: none;
22 | color: #fff;
23 | font-size: 20px;
24 | }
25 |
26 | #output {
27 | height:500px;
28 | }
29 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/Editor/MyBuildProcessor.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using Assets.Sagiri.Editor;
3 | using UnityEditor;
4 | using UnityEditor.Callbacks;
5 | using UnityEngine;
6 |
7 | namespace Assets.Sagiri.Examples.Editor {
8 | class MyBuildPostprocessor {
9 | [PostProcessBuild(1)]
10 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
11 | if (!Debug.isDebugBuild) {
12 | EntryPoint.RemoveSteamingAssets(target, pathToBuiltProject);
13 | }
14 | }
15 | }
16 | }
17 | #endif
18 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/StreamingAssets/Sagiri/shell.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | sagiri
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/Tests/JsonWriterTest.cs:
--------------------------------------------------------------------------------
1 | using NUnit.Framework;
2 | using Assets.Sagiri.Editor;
3 |
4 | namespace Assets.Sagiri.Editor.Tests {
5 | class JsonStringTest {
6 | [Test]
7 | public void FilterTest() {
8 | var cases = new[]
9 | {
10 | new { a = "a\nb", b = @"a\nb" },
11 | new { a = "a\r\nb", b = @"a\nb" },
12 | new { a = @"a""b", b = @"a\""b" },
13 | new { a = @"a\b", b = @"a\\b" },
14 | };
15 | foreach (var c in cases) {
16 | var v = JsonString.Filter(c.a);
17 | Assert.AreEqual(c.b, v);
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Unity
2 | UnityProject*/[Ll]ibrary/
3 | UnityProject*/[Tt]emp/
4 | UnityProject*/[Oo]bj/
5 | UnityProject*/[Bb]uild/
6 | UnityProject*/[Bb]uilds/
7 | UnityProject*/Assets/AssetStoreTools*
8 |
9 | # Visual Studio 2015 cache directory
10 | .vs
11 |
12 | # Autogenerated VS/MD/Consulo solution and project files
13 | ExportedObj/
14 | .consulo/
15 | *.csproj
16 | *.unityproj
17 | *.sln
18 | *.suo
19 | *.tmp
20 | *.user
21 | *.userprefs
22 | *.pidb
23 | *.booproj
24 | *.svd
25 | *.pdb
26 |
27 | # Unity3D generated meta files
28 | *.pidb.meta
29 |
30 | # Unity3D Generated File On Crash Reports
31 | sysinfo.txt
32 |
33 | # Builds
34 | *.apk
35 | *.unitypackage
36 | *.exe
37 | *.exe.meta
38 |
39 | *.log
40 |
41 | # temp
42 | UnityProject_Sagiri/output/
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_EnablePCM: 1
18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
19 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 1
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 5분실험실
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 all
13 | 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 THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/ShowOnlyDrawer.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace Assets.Sagiri.Editor {
6 | [CustomPropertyDrawer(typeof(ShowOnlyAttribute))]
7 | public class ShowOnlyDrawer : PropertyDrawer {
8 | public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label) {
9 | string valueStr;
10 |
11 | switch (prop.propertyType) {
12 | case SerializedPropertyType.Integer:
13 | valueStr = prop.intValue.ToString();
14 | break;
15 | case SerializedPropertyType.Boolean:
16 | valueStr = prop.boolValue.ToString();
17 | break;
18 | case SerializedPropertyType.Float:
19 | valueStr = prop.floatValue.ToString("0.00000");
20 | break;
21 | case SerializedPropertyType.String:
22 | valueStr = prop.stringValue;
23 | break;
24 | default:
25 | valueStr = "(not supported)";
26 | break;
27 | }
28 |
29 | EditorGUI.LabelField(position, label.text, valueStr);
30 | }
31 | }
32 | }
33 | #endif
34 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Assets.Sagiri.Examples {
5 | public class Main : MonoBehaviour {
6 | // Use this for initialization
7 | void Start() {
8 | Debug.Log("Start");
9 | }
10 |
11 | private void OnDestroy() {
12 | Debug.Log("OnDestory");
13 | }
14 |
15 | int rightClickCount = 0;
16 |
17 | // Update is called once per frame
18 | void Update() {
19 | if (Input.GetMouseButtonDown(0)) {
20 | // left
21 | PrintLog();
22 | }
23 |
24 | if (Input.GetMouseButtonDown(1)) {
25 | // right
26 | rightClickCount += 1;
27 | Debug.LogFormat("right click : {0}", rightClickCount);
28 | }
29 |
30 | if (Input.GetKey(KeyCode.A)) {
31 | Debug.LogFormat("key pressed : {0}", Time.time);
32 | }
33 | }
34 |
35 | void PrintLog() {
36 | Debug.Log("this is log", this);
37 | Debug.LogWarning("this is warning", this);
38 | Debug.LogError("this is error", this);
39 | Debug.LogException(new NullReferenceException("this is exception"), this);
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Attributes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text.RegularExpressions;
3 |
4 | namespace Assets.Sagiri {
5 | [AttributeUsage(AttributeTargets.Method)]
6 | public class CommandAttribute : Attribute {
7 | public delegate void CallbackSimple();
8 | public delegate void Callback(string[] args);
9 |
10 | public CommandAttribute(string cmd, string help, bool runOnMainThread = true) {
11 | m_command = cmd;
12 | m_help = help;
13 | m_runOnMainThread = runOnMainThread;
14 | }
15 |
16 | public string m_command;
17 | public string m_help;
18 | public bool m_runOnMainThread;
19 | public Callback m_callback;
20 | }
21 |
22 | [AttributeUsage(AttributeTargets.Method)]
23 | public class RouteAttribute : Attribute {
24 | public delegate void Callback(RequestContext context);
25 |
26 | public RouteAttribute(string route, string methods = @"(GET|HEAD)", bool runOnMainThread = true) {
27 | m_route = new Regex(route, RegexOptions.IgnoreCase);
28 | m_methods = new Regex(methods);
29 | m_runOnMainThread = runOnMainThread;
30 | }
31 |
32 | public Regex m_route;
33 | public Regex m_methods;
34 | public bool m_runOnMainThread;
35 | public Callback m_callback;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_QueriesHitTriggers: 1
23 | m_QueriesStartInColliders: 1
24 | m_ChangeStopsCallbacks: 0
25 | m_CallbacksOnDisable: 1
26 | m_AlwaysShowColliders: 0
27 | m_ShowColliderSleep: 1
28 | m_ShowColliderContacts: 0
29 | m_ShowColliderAABB: 0
30 | m_ContactArrowScale: 0.2
31 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
32 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
33 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
34 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
35 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sagiri
2 |
3 | [](https://travis-ci.org/5minlab/sagiri)
4 |
5 | Web browser based Realtime Untiy3D Log viewer
6 |
7 | 
8 |
9 | 
10 |
11 | It mix two library, [CUDLR][CUDLR] and [Unity-File-Debug].
12 | Use [CUDLR][CUDLR] as log server.
13 | Use [Unity-File-Debug][Unity-File-Debug] as log viewer.
14 |
15 | ## Features
16 | * Supports iOS, Android, PC/Mac Standalone, and the Unity Editor
17 | * Capture Unity log messages and stack traces
18 |
19 | ## How to use
20 | 1. Import [latest release's package](https://github.com/5minlab/sagiri/releases) into your project.
21 | 2. Move the prefab `SagiriServer` into your scene
22 | 3. Set the port on `SagiriServer` game object. (default value is 55055)
23 | 4. Run the game and connect to http://localhost:55055 with your browser.
24 | (you can find address in unity game screen)
25 | 5. If you want to view log in unity build, check `Development build` flag.
26 | or comment this code block.
27 |
28 | ```
29 | [PostProcessBuild(1)]
30 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
31 | if (!Debug.isDebugBuild) {
32 | //EntryPoint.RemoveSteamingAssets(target, pathToBuiltProject);
33 | }
34 | }
35 | ```
36 |
37 | ## Example
38 | open scene, `Sagiri/Examples/SagiriExample`
39 |
40 | [CUDLR]: https://github.com/proletariatgames/CUDLR
41 | [Unity-File-Debug]: https://github.com/Sacred-Seed-Studio/Unity-File-Debug
42 |
--------------------------------------------------------------------------------
/scripts/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # view-source:https://store.unity.com/kr/download/thank-you?thank-you=personal&os=osx&nid=325
4 |
5 | # stable release
6 | # BASE_URL=http://netstorage.unity3d.com/unity
7 |
8 | # patch release
9 | BASE_URL=http://beta.unity3d.com/download
10 |
11 | #HASH=a2913c821e27
12 | #VERSION=5.6.2f1
13 |
14 | HASH=732dbf75922d
15 | VERSION=2018.1.5f1
16 |
17 | CACHE_DIR=unity-installers
18 |
19 | download() {
20 | package=$1
21 | file=$1
22 | url="$BASE_URL/$HASH/$package"
23 |
24 | echo "Downloading from $url: "
25 | curl -o $CACHE_DIR/`basename "$package"` "$url"
26 | }
27 |
28 | install() {
29 | package=$1
30 | echo "Installing "`basename "$package"`
31 | sudo installer -dumplog -package $CACHE_DIR/`basename "$package"` -target /
32 | }
33 |
34 | main() {
35 | package=$1
36 |
37 | if [ ! -f $CACHE_DIR/`basename "$package"` ]; then
38 | download "$package"
39 | fi
40 |
41 | install "$package"
42 | }
43 |
44 |
45 | case "$1" in
46 | "editor")
47 | main "MacEditorInstaller/Unity-$VERSION.pkg"
48 | ;;
49 | "windows")
50 | main "MacEditorTargetInstaller/UnitySetup-Windows-Support-for-Editor-$VERSION.pkg"
51 | ;;
52 | "mac")
53 | main "MacEditorTargetInstaller/UnitySetup-Mac-Support-for-Editor-$VERSION.pkg"
54 | ;;
55 | "linux")
56 | main "MacEditorTargetInstaller/UnitySetup-Linux-Support-for-Editor-$VERSION.pkg"
57 | ;;
58 | "android")
59 | main "MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-$VERSION.pkg"
60 | ;;
61 | "ios")
62 | main "MacEditorTargetInstaller/UnitySetup-iOS-Support-for-Editor-$VERSION.pkg"
63 | ;;
64 | *)
65 | echo "unknown unity installer : $1"
66 | esac
67 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | m_SettingNames:
89 | - Humanoid
90 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Prefabs/SagiriServer.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &100000
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_PrefabParentObject: {fileID: 0}
7 | m_PrefabInternal: {fileID: 100100000}
8 | serializedVersion: 5
9 | m_Component:
10 | - component: {fileID: 400000}
11 | - component: {fileID: 114940109664832240}
12 | m_Layer: 0
13 | m_Name: SagiriServer
14 | m_TagString: Untagged
15 | m_Icon: {fileID: 0}
16 | m_NavMeshLayer: 0
17 | m_StaticEditorFlags: 0
18 | m_IsActive: 1
19 | --- !u!4 &400000
20 | Transform:
21 | m_ObjectHideFlags: 1
22 | m_PrefabParentObject: {fileID: 0}
23 | m_PrefabInternal: {fileID: 100100000}
24 | m_GameObject: {fileID: 100000}
25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
26 | m_LocalPosition: {x: 0, y: 0, z: 0}
27 | m_LocalScale: {x: 1, y: 1, z: 1}
28 | m_Children: []
29 | m_Father: {fileID: 0}
30 | m_RootOrder: 0
31 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
32 | --- !u!1001 &100100000
33 | Prefab:
34 | m_ObjectHideFlags: 1
35 | serializedVersion: 2
36 | m_Modification:
37 | m_TransformParent: {fileID: 0}
38 | m_Modifications: []
39 | m_RemovedComponents: []
40 | m_ParentPrefab: {fileID: 0}
41 | m_RootGameObject: {fileID: 100000}
42 | m_IsPrefabParent: 1
43 | --- !u!114 &114940109664832240
44 | MonoBehaviour:
45 | m_ObjectHideFlags: 1
46 | m_PrefabParentObject: {fileID: 0}
47 | m_PrefabInternal: {fileID: 100100000}
48 | m_GameObject: {fileID: 100000}
49 | m_Enabled: 1
50 | m_EditorHideFlags: 0
51 | m_Script: {fileID: 11500000, guid: f8f10e2c123fa384dba52280f85879f7, type: 3}
52 | m_Name:
53 | m_EditorClassIdentifier:
54 | Port: 55055
55 | RegisterLogCallback: 1
56 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ads": "2.3.1",
4 | "com.unity.analytics": "3.2.2",
5 | "com.unity.collab-proxy": "1.2.15",
6 | "com.unity.package-manager-ui": "2.0.3",
7 | "com.unity.purchasing": "2.0.3",
8 | "com.unity.textmeshpro": "1.3.0",
9 | "com.unity.modules.ai": "1.0.0",
10 | "com.unity.modules.animation": "1.0.0",
11 | "com.unity.modules.assetbundle": "1.0.0",
12 | "com.unity.modules.audio": "1.0.0",
13 | "com.unity.modules.cloth": "1.0.0",
14 | "com.unity.modules.director": "1.0.0",
15 | "com.unity.modules.imageconversion": "1.0.0",
16 | "com.unity.modules.imgui": "1.0.0",
17 | "com.unity.modules.jsonserialize": "1.0.0",
18 | "com.unity.modules.particlesystem": "1.0.0",
19 | "com.unity.modules.physics": "1.0.0",
20 | "com.unity.modules.physics2d": "1.0.0",
21 | "com.unity.modules.screencapture": "1.0.0",
22 | "com.unity.modules.terrain": "1.0.0",
23 | "com.unity.modules.terrainphysics": "1.0.0",
24 | "com.unity.modules.tilemap": "1.0.0",
25 | "com.unity.modules.ui": "1.0.0",
26 | "com.unity.modules.uielements": "1.0.0",
27 | "com.unity.modules.umbra": "1.0.0",
28 | "com.unity.modules.unityanalytics": "1.0.0",
29 | "com.unity.modules.unitywebrequest": "1.0.0",
30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
31 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
32 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
33 | "com.unity.modules.unitywebrequestwww": "1.0.0",
34 | "com.unity.modules.vehicles": "1.0.0",
35 | "com.unity.modules.video": "1.0.0",
36 | "com.unity.modules.vr": "1.0.0",
37 | "com.unity.modules.wind": "1.0.0",
38 | "com.unity.modules.xr": "1.0.0"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Editor/EnvironmentReader.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using System;
3 | using UnityEngine;
4 | /*
5 | * https://github.com/5minlab/minamo/blob/master/UnityProject/Assets/Minamo/Editor/EnvironmentReader.cs
6 | */
7 |
8 | namespace Assets.Sagiri.Editor {
9 | class EnvironmentReader {
10 | internal static bool TryRead(string key, out string val) {
11 | var parser = new Parser_String();
12 | try {
13 | var s = Environment.GetEnvironmentVariable(key);
14 | return parser.Parse(s, out val);
15 |
16 | } catch (ArgumentNullException e) {
17 | Debug.LogError(e.Message);
18 | val = "";
19 | return false;
20 | }
21 | }
22 |
23 | interface Parser {
24 | bool Parse(string s, out T val);
25 | }
26 |
27 | class Parser_Int : Parser {
28 | public bool Parse(string s, out int val) {
29 | if (s == null) {
30 | val = 0;
31 | return false;
32 | }
33 |
34 | try {
35 | val = int.Parse(s);
36 | return true;
37 |
38 | } catch (FormatException) {
39 | val = 0;
40 | return false;
41 | }
42 | }
43 | }
44 |
45 | class Parser_String : Parser {
46 | public bool Parse(string s, out string val) {
47 | if (s == null) {
48 | val = "";
49 | return false;
50 | }
51 |
52 | val = s;
53 | return true;
54 | }
55 | }
56 | }
57 | }
58 | #endif
59 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/LogEntry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using UnityEngine;
4 |
5 | namespace Assets.Sagiri {
6 | class LogEntry : IJsonSerializable {
7 | static readonly string[] logTypeStrTable;
8 | static LogEntry() {
9 | // optimize gc
10 | var enums = Enum.GetValues(typeof(LogType));
11 |
12 | Debug.Assert((int)LogType.Error == 0);
13 | Debug.Assert((int)LogType.Exception == 4);
14 | Debug.Assert((int)enums.Length == 5);
15 |
16 | logTypeStrTable = new string[enums.Length];
17 | for(int i = 0; i < enums.Length; i++) {
18 | var s = Enum.GetName(typeof(LogType), i);
19 | logTypeStrTable[i] = s;
20 | }
21 | }
22 |
23 | public readonly int uid;
24 |
25 | public readonly string log;
26 | public readonly string stacktrace;
27 |
28 | public readonly LogType level;
29 | public readonly DateTime time;
30 |
31 | static int nextUid = 1;
32 |
33 | readonly JsonObject json;
34 |
35 | public LogEntry(string log, string stacktrace, LogType lv, DateTime time) {
36 | uid = nextUid;
37 | nextUid += 1;
38 |
39 | this.log = log;
40 | this.stacktrace = stacktrace;
41 | this.level = lv;
42 | this.time = time;
43 |
44 | var lvName = logTypeStrTable[(int)lv];
45 |
46 | json = new JsonObject();
47 | json["l"] = new JsonString(log);
48 | json["t"] = new JsonString(lvName);
49 | // "2016.09.24.04.23.04"
50 | json["tm"] = new JsonString(time.ToString("yyyy.MM.dd.HH.mm.ss"));
51 | json["s"] = new JsonString(stacktrace);
52 | json["id"] = new JsonInt(uid);
53 | }
54 |
55 | public void AppendJson(StringBuilder sb) {
56 | json.AppendJson(sb);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Console.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using UnityEngine;
5 |
6 | namespace Assets.Sagiri {
7 | public class Console {
8 | ///
9 | /// Max number of lines in the console output
10 | ///
11 | const int MAX_LINES = 100;
12 |
13 | readonly static Console Instance = new Console();
14 | readonly List m_output = new List();
15 |
16 | public static void Log(string str, string stacktrace, LogType lv, DateTime time) {
17 | Instance.m_output.Add(new LogEntry(str, stacktrace, lv, time));
18 | if (Instance.m_output.Count > MAX_LINES) {
19 | Instance.m_output.RemoveAt(0);
20 | }
21 | }
22 |
23 | /* Callback for Unity logging */
24 | public static void LogCallback(string logString, string stackTrace, LogType type) {
25 | var now = DateTime.Now;
26 | Console.Log(logString, stackTrace, type, now);
27 | }
28 |
29 | static readonly JsonArray jsonBuilder = new JsonArray();
30 |
31 | #if !NETFX_CORE
32 | // Our routes
33 | [Route("^/console/fetch$")]
34 | public static void FetchLog(RequestContext context) {
35 | // 로그를 어디부터 이어서 받을지 정할수 있도록
36 | // 매번 전체 로그를 보낼 필요는 없을것이다
37 | var last = context.Request.QueryString.Get("last");
38 | int lastId = 0;
39 | if (!int.TryParse(last, out lastId)) {
40 | lastId = 0;
41 | }
42 |
43 | // 필요한것만 내려주도록
44 | jsonBuilder.Clear();
45 | foreach (var r in Instance.m_output) {
46 | if (r.uid > lastId) {
47 | jsonBuilder.Add(r);
48 | }
49 | }
50 | var sb = new StringBuilder();
51 | jsonBuilder.AppendJson(sb);
52 | var json = sb.ToString();
53 | context.Response.WriteString(json, "application/json");
54 | }
55 | #endif
56 | }
57 | }
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Net;
3 |
4 | namespace Assets.Sagiri {
5 | #if !NETFX_CORE
6 | public static class ResponseExtension {
7 | public static void WriteString(this HttpListenerResponse response, string input, string type = "text/plain") {
8 | response.StatusCode = (int)HttpStatusCode.OK;
9 | response.StatusDescription = "OK";
10 |
11 | if (!string.IsNullOrEmpty(input)) {
12 | byte[] buffer = System.Text.Encoding.UTF8.GetBytes(input);
13 | response.ContentLength64 = buffer.Length;
14 | response.ContentType = type;
15 | response.OutputStream.Write(buffer, 0, buffer.Length);
16 | }
17 | }
18 |
19 | public static void WriteBytes(this HttpListenerResponse response, byte[] bytes) {
20 | response.StatusCode = (int)HttpStatusCode.OK;
21 | response.StatusDescription = "OK";
22 | response.ContentLength64 = bytes.Length;
23 | response.OutputStream.Write(bytes, 0, bytes.Length);
24 | }
25 |
26 | public static void WriteFile(this HttpListenerResponse response, string path, string type = "application/octet-stream", bool download = false) {
27 | using (FileStream fs = File.OpenRead(path)) {
28 | response.StatusCode = (int)HttpStatusCode.OK;
29 | response.StatusDescription = "OK";
30 | response.ContentLength64 = fs.Length;
31 | response.ContentType = type;
32 | if (download)
33 | response.AddHeader("Content-disposition", string.Format("attachment; filename={0}", Path.GetFileName(path)));
34 |
35 | byte[] buffer = new byte[64 * 1024];
36 | int read;
37 | while ((read = fs.Read(buffer, 0, buffer.Length)) > 0) {
38 | // FIXME required?
39 | System.Threading.Thread.Sleep(0);
40 | response.OutputStream.Write(buffer, 0, read);
41 | }
42 | }
43 | }
44 | }
45 | #endif
46 | }
47 |
--------------------------------------------------------------------------------
/UnityProject_Sagiri/Assets/Sagiri/Examples/GameObjectExamples.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using UnityEngine;
3 |
4 | namespace Assets.Sagiri.Examples {
5 | /**
6 | * Example console commands for getting information about GameObjects
7 | */
8 | public static class GameObjectCommands {
9 |
10 | [Command("object list", "lists all the game objects in the scene")]
11 | public static void ListGameObjects() {
12 | Object[] objects = Object.FindObjectsOfType(typeof(GameObject));
13 | foreach (Object obj in objects) {
14 | Shell.Log(obj.name);
15 | }
16 | }
17 |
18 | [Command("object print", "lists properties of the object")]
19 | public static void PrintGameObject(string[] args) {
20 | if (args.Length < 1) {
21 | Shell.Log("expected : object print