├── .gitignore ├── Assets ├── Animations.meta ├── Animations │ ├── Console.meta │ └── Console │ │ ├── Console.controller │ │ ├── Console.controller.meta │ │ ├── ConsoleDisabledIdle.anim │ │ ├── ConsoleDisabledIdle.anim.meta │ │ ├── ConsoleEnabledIdle.anim │ │ ├── ConsoleEnabledIdle.anim.meta │ │ ├── ConsoleHide.anim │ │ ├── ConsoleHide.anim.meta │ │ ├── ConsoleShow.anim │ │ └── ConsoleShow.anim.meta ├── Materials.meta ├── Materials │ ├── Example.meta │ └── Example │ │ ├── CubeMat.mat │ │ ├── CubeMat.mat.meta │ │ ├── LevelDarkMat.mat │ │ ├── LevelDarkMat.mat.meta │ │ ├── LevelLightMat.mat │ │ └── LevelLightMat.mat.meta ├── Prefabs.meta ├── Prefabs │ ├── Console.meta │ ├── Console │ │ ├── Console.prefab │ │ ├── Console.prefab.meta │ │ ├── NetworkConsole.prefab │ │ └── NetworkConsole.prefab.meta │ ├── Example.meta │ └── Example │ │ ├── Level.prefab │ │ ├── Level.prefab.meta │ │ ├── pb_Mesh17774.asset │ │ └── pb_Mesh17774.asset.meta ├── ProBuilder Data.meta ├── ProBuilder Data │ ├── ProBuilderPreferences.asset │ └── ProBuilderPreferences.asset.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── Scripts.meta ├── Scripts │ ├── Console.meta │ ├── Console │ │ ├── Args.meta │ │ ├── Args │ │ │ ├── VisibilityChangedArgs.cs │ │ │ └── VisibilityChangedArgs.cs.meta │ │ ├── Attributes.meta │ │ ├── Attributes │ │ │ ├── ConsoleMethod.cs │ │ │ ├── ConsoleMethod.cs.meta │ │ │ ├── ConsoleParameter.cs │ │ │ ├── ConsoleParameter.cs.meta │ │ │ ├── ConversionMethod.cs │ │ │ ├── ConversionMethod.cs.meta │ │ │ ├── ExecutableFromConsole.cs │ │ │ └── ExecutableFromConsole.cs.meta │ │ ├── ConsoleLogic.cs │ │ ├── ConsoleLogic.cs.meta │ │ ├── Converters.meta │ │ ├── Converters │ │ │ ├── BaseConverter.cs │ │ │ ├── BaseConverter.cs.meta │ │ │ ├── ColorConverter.cs │ │ │ ├── ColorConverter.cs.meta │ │ │ ├── GameObjectConverter.cs │ │ │ ├── GameObjectConverter.cs.meta │ │ │ ├── IConverter.cs │ │ │ ├── IConverter.cs.meta │ │ │ ├── TypeParser.cs │ │ │ ├── TypeParser.cs.meta │ │ │ ├── Vector2Converter.cs │ │ │ ├── Vector2Converter.cs.meta │ │ │ ├── Vector3Converter.cs │ │ │ └── Vector3Converter.cs.meta │ │ ├── Customization.meta │ │ ├── Customization │ │ │ ├── OutputColors.cs │ │ │ └── OutputColors.cs.meta │ │ ├── Helpers.meta │ │ ├── Helpers │ │ │ ├── ConsoleHistory.cs │ │ │ ├── ConsoleHistory.cs.meta │ │ │ ├── ExtensionMethods.cs │ │ │ ├── ExtensionMethods.cs.meta │ │ │ ├── InputReceivedEventArgs.cs │ │ │ └── InputReceivedEventArgs.cs.meta │ │ ├── IO.meta │ │ ├── IO │ │ │ ├── BaseConsoleIO.cs │ │ │ ├── BaseConsoleIO.cs.meta │ │ │ ├── ConsoleIO.cs │ │ │ ├── ConsoleIO.cs.meta │ │ │ ├── NetworkIO.cs │ │ │ └── NetworkIO.cs.meta │ │ ├── Writers.meta │ │ └── Writers │ │ │ ├── BaseWriter.cs │ │ │ ├── BaseWriter.cs.meta │ │ │ ├── ConsoleWriter.cs │ │ │ ├── ConsoleWriter.cs.meta │ │ │ ├── FormattedWriter.cs │ │ │ ├── FormattedWriter.cs.meta │ │ │ ├── NetworkWriter.cs │ │ │ └── NetworkWriter.cs.meta │ ├── Example.meta │ └── Example │ │ ├── CameraShiftEffect.cs │ │ ├── CameraShiftEffect.cs.meta │ │ ├── GameControllerCommands.cs │ │ └── GameControllerCommands.cs.meta ├── Textures.meta └── Textures │ ├── LightTileTex.png │ ├── LightTileTex.png.meta │ ├── TileTex.png │ └── TileTex.png.meta ├── Documentation ├── ambiguity.png ├── chelp.png ├── console.png ├── diagram.png ├── screenshot.gif ├── screenshot.psd └── strings.png ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset ├── Readme.md └── ingame-console.unitypackage /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk -------------------------------------------------------------------------------- /Assets/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61e4672efaf9858409d59b735df0cddf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/Console.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dce31d65463e557488ee7c348229e6d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/Console/Console.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Console 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: Show 12 | m_Type: 4 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 9100000} 17 | m_AnimatorLayers: 18 | - serializedVersion: 5 19 | m_Name: Base Layer 20 | m_StateMachine: {fileID: 1107056528728502042} 21 | m_Mask: {fileID: 0} 22 | m_Motions: [] 23 | m_Behaviours: [] 24 | m_BlendingMode: 0 25 | m_SyncedLayerIndex: -1 26 | m_DefaultWeight: 0 27 | m_IKPass: 0 28 | m_SyncedLayerAffectsTiming: 0 29 | m_Controller: {fileID: 9100000} 30 | --- !u!1101 &1101058987786663148 31 | AnimatorStateTransition: 32 | m_ObjectHideFlags: 1 33 | m_CorrespondingSourceObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 0} 35 | m_Name: 36 | m_Conditions: 37 | - m_ConditionMode: 1 38 | m_ConditionEvent: Show 39 | m_EventTreshold: 0 40 | m_DstStateMachine: {fileID: 0} 41 | m_DstState: {fileID: 1102471189829552882} 42 | m_Solo: 0 43 | m_Mute: 0 44 | m_IsExit: 0 45 | serializedVersion: 3 46 | m_TransitionDuration: 0 47 | m_TransitionOffset: 0 48 | m_ExitTime: 0.75 49 | m_HasExitTime: 0 50 | m_HasFixedDuration: 1 51 | m_InterruptionSource: 0 52 | m_OrderedInterruption: 1 53 | m_CanTransitionToSelf: 1 54 | --- !u!1101 &1101118200745156608 55 | AnimatorStateTransition: 56 | m_ObjectHideFlags: 1 57 | m_CorrespondingSourceObject: {fileID: 0} 58 | m_PrefabInternal: {fileID: 0} 59 | m_Name: 60 | m_Conditions: [] 61 | m_DstStateMachine: {fileID: 0} 62 | m_DstState: {fileID: 1102297674783844966} 63 | m_Solo: 0 64 | m_Mute: 0 65 | m_IsExit: 0 66 | serializedVersion: 3 67 | m_TransitionDuration: 0 68 | m_TransitionOffset: 0 69 | m_ExitTime: 1 70 | m_HasExitTime: 1 71 | m_HasFixedDuration: 1 72 | m_InterruptionSource: 0 73 | m_OrderedInterruption: 1 74 | m_CanTransitionToSelf: 1 75 | --- !u!1101 &1101148023873969948 76 | AnimatorStateTransition: 77 | m_ObjectHideFlags: 1 78 | m_CorrespondingSourceObject: {fileID: 0} 79 | m_PrefabInternal: {fileID: 0} 80 | m_Name: 81 | m_Conditions: 82 | - m_ConditionMode: 2 83 | m_ConditionEvent: Show 84 | m_EventTreshold: 0 85 | m_DstStateMachine: {fileID: 0} 86 | m_DstState: {fileID: 1102219386955590660} 87 | m_Solo: 0 88 | m_Mute: 0 89 | m_IsExit: 0 90 | serializedVersion: 3 91 | m_TransitionDuration: 0 92 | m_TransitionOffset: 0 93 | m_ExitTime: 1 94 | m_HasExitTime: 0 95 | m_HasFixedDuration: 1 96 | m_InterruptionSource: 0 97 | m_OrderedInterruption: 1 98 | m_CanTransitionToSelf: 1 99 | --- !u!1101 &1101784628261485468 100 | AnimatorStateTransition: 101 | m_ObjectHideFlags: 1 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInternal: {fileID: 0} 104 | m_Name: 105 | m_Conditions: 106 | - m_ConditionMode: 2 107 | m_ConditionEvent: Show 108 | m_EventTreshold: 0 109 | m_DstStateMachine: {fileID: 0} 110 | m_DstState: {fileID: 1102219386955590660} 111 | m_Solo: 0 112 | m_Mute: 0 113 | m_IsExit: 0 114 | serializedVersion: 3 115 | m_TransitionDuration: 0.25 116 | m_TransitionOffset: 0 117 | m_ExitTime: 0.25 118 | m_HasExitTime: 0 119 | m_HasFixedDuration: 1 120 | m_InterruptionSource: 0 121 | m_OrderedInterruption: 1 122 | m_CanTransitionToSelf: 1 123 | --- !u!1101 &1101826593580416410 124 | AnimatorStateTransition: 125 | m_ObjectHideFlags: 1 126 | m_CorrespondingSourceObject: {fileID: 0} 127 | m_PrefabInternal: {fileID: 0} 128 | m_Name: 129 | m_Conditions: 130 | - m_ConditionMode: 1 131 | m_ConditionEvent: Show 132 | m_EventTreshold: 0 133 | m_DstStateMachine: {fileID: 0} 134 | m_DstState: {fileID: 1102471189829552882} 135 | m_Solo: 0 136 | m_Mute: 0 137 | m_IsExit: 0 138 | serializedVersion: 3 139 | m_TransitionDuration: 0.25 140 | m_TransitionOffset: 0 141 | m_ExitTime: 0.25 142 | m_HasExitTime: 0 143 | m_HasFixedDuration: 1 144 | m_InterruptionSource: 0 145 | m_OrderedInterruption: 1 146 | m_CanTransitionToSelf: 1 147 | --- !u!1101 &1101970532323496856 148 | AnimatorStateTransition: 149 | m_ObjectHideFlags: 1 150 | m_CorrespondingSourceObject: {fileID: 0} 151 | m_PrefabInternal: {fileID: 0} 152 | m_Name: 153 | m_Conditions: [] 154 | m_DstStateMachine: {fileID: 0} 155 | m_DstState: {fileID: 1102028995830237472} 156 | m_Solo: 0 157 | m_Mute: 0 158 | m_IsExit: 0 159 | serializedVersion: 3 160 | m_TransitionDuration: 0 161 | m_TransitionOffset: 0 162 | m_ExitTime: 1 163 | m_HasExitTime: 1 164 | m_HasFixedDuration: 1 165 | m_InterruptionSource: 0 166 | m_OrderedInterruption: 1 167 | m_CanTransitionToSelf: 1 168 | --- !u!1102 &1102028995830237472 169 | AnimatorState: 170 | serializedVersion: 5 171 | m_ObjectHideFlags: 1 172 | m_CorrespondingSourceObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_Name: ConsoleEnabledIdle 175 | m_Speed: 1 176 | m_CycleOffset: 0 177 | m_Transitions: 178 | - {fileID: 1101148023873969948} 179 | m_StateMachineBehaviours: [] 180 | m_Position: {x: 50, y: 50, z: 0} 181 | m_IKOnFeet: 0 182 | m_WriteDefaultValues: 1 183 | m_Mirror: 0 184 | m_SpeedParameterActive: 0 185 | m_MirrorParameterActive: 0 186 | m_CycleOffsetParameterActive: 0 187 | m_TimeParameterActive: 0 188 | m_Motion: {fileID: 7400000, guid: 4bf79778e014ada4b8754e9177d27b67, type: 2} 189 | m_Tag: 190 | m_SpeedParameter: 191 | m_MirrorParameter: 192 | m_CycleOffsetParameter: 193 | m_TimeParameter: 194 | --- !u!1102 &1102219386955590660 195 | AnimatorState: 196 | serializedVersion: 5 197 | m_ObjectHideFlags: 1 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInternal: {fileID: 0} 200 | m_Name: ConsoleHide 201 | m_Speed: 1 202 | m_CycleOffset: 0 203 | m_Transitions: 204 | - {fileID: 1101118200745156608} 205 | - {fileID: 1101826593580416410} 206 | m_StateMachineBehaviours: [] 207 | m_Position: {x: 50, y: 50, z: 0} 208 | m_IKOnFeet: 0 209 | m_WriteDefaultValues: 1 210 | m_Mirror: 0 211 | m_SpeedParameterActive: 0 212 | m_MirrorParameterActive: 0 213 | m_CycleOffsetParameterActive: 0 214 | m_TimeParameterActive: 0 215 | m_Motion: {fileID: 7400000, guid: 94981eebe6324884993ddb5481b659ca, type: 2} 216 | m_Tag: 217 | m_SpeedParameter: 218 | m_MirrorParameter: 219 | m_CycleOffsetParameter: 220 | m_TimeParameter: 221 | --- !u!1102 &1102297674783844966 222 | AnimatorState: 223 | serializedVersion: 5 224 | m_ObjectHideFlags: 1 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInternal: {fileID: 0} 227 | m_Name: ConsoleDisabledIdle 228 | m_Speed: 1 229 | m_CycleOffset: 0 230 | m_Transitions: 231 | - {fileID: 1101058987786663148} 232 | m_StateMachineBehaviours: [] 233 | m_Position: {x: 50, y: 50, z: 0} 234 | m_IKOnFeet: 0 235 | m_WriteDefaultValues: 1 236 | m_Mirror: 0 237 | m_SpeedParameterActive: 0 238 | m_MirrorParameterActive: 0 239 | m_CycleOffsetParameterActive: 0 240 | m_TimeParameterActive: 0 241 | m_Motion: {fileID: 7400000, guid: 0e1483d14d162c4458a35aa146a48d7f, type: 2} 242 | m_Tag: 243 | m_SpeedParameter: 244 | m_MirrorParameter: 245 | m_CycleOffsetParameter: 246 | m_TimeParameter: 247 | --- !u!1102 &1102471189829552882 248 | AnimatorState: 249 | serializedVersion: 5 250 | m_ObjectHideFlags: 1 251 | m_CorrespondingSourceObject: {fileID: 0} 252 | m_PrefabInternal: {fileID: 0} 253 | m_Name: ConsoleShow 254 | m_Speed: 1 255 | m_CycleOffset: 0 256 | m_Transitions: 257 | - {fileID: 1101970532323496856} 258 | - {fileID: 1101784628261485468} 259 | m_StateMachineBehaviours: [] 260 | m_Position: {x: 50, y: 50, z: 0} 261 | m_IKOnFeet: 0 262 | m_WriteDefaultValues: 1 263 | m_Mirror: 0 264 | m_SpeedParameterActive: 0 265 | m_MirrorParameterActive: 0 266 | m_CycleOffsetParameterActive: 0 267 | m_TimeParameterActive: 0 268 | m_Motion: {fileID: 7400000, guid: ac0140abaea7ec34f9fa2bab9638e6f3, type: 2} 269 | m_Tag: 270 | m_SpeedParameter: 271 | m_MirrorParameter: 272 | m_CycleOffsetParameter: 273 | m_TimeParameter: 274 | --- !u!1107 &1107056528728502042 275 | AnimatorStateMachine: 276 | serializedVersion: 5 277 | m_ObjectHideFlags: 1 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInternal: {fileID: 0} 280 | m_Name: Base Layer 281 | m_ChildStates: 282 | - serializedVersion: 1 283 | m_State: {fileID: 1102297674783844966} 284 | m_Position: {x: 168, y: 24, z: 0} 285 | - serializedVersion: 1 286 | m_State: {fileID: 1102028995830237472} 287 | m_Position: {x: 648, y: 24, z: 0} 288 | - serializedVersion: 1 289 | m_State: {fileID: 1102471189829552882} 290 | m_Position: {x: 408, y: -144, z: 0} 291 | - serializedVersion: 1 292 | m_State: {fileID: 1102219386955590660} 293 | m_Position: {x: 432, y: 264, z: 0} 294 | m_ChildStateMachines: [] 295 | m_AnyStateTransitions: [] 296 | m_EntryTransitions: [] 297 | m_StateMachineTransitions: {} 298 | m_StateMachineBehaviours: [] 299 | m_AnyStatePosition: {x: 24, y: -96, z: 0} 300 | m_EntryPosition: {x: 50, y: 120, z: 0} 301 | m_ExitPosition: {x: 852, y: 240, z: 0} 302 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 303 | m_DefaultState: {fileID: 1102297674783844966} 304 | -------------------------------------------------------------------------------- /Assets/Animations/Console/Console.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe23686e437aeff4f8edf6e69cb030f5 3 | timeCreated: 1507132186 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 9100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleDisabledIdle.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: ConsoleDisabledIdle 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: [] 16 | m_PositionCurves: [] 17 | m_ScaleCurves: [] 18 | m_FloatCurves: 19 | - curve: 20 | serializedVersion: 2 21 | m_Curve: 22 | - serializedVersion: 3 23 | time: 0 24 | value: 0 25 | inSlope: 0 26 | outSlope: 0 27 | tangentMode: 136 28 | weightedMode: 0 29 | inWeight: 0.33333334 30 | outWeight: 0.33333334 31 | m_PreInfinity: 2 32 | m_PostInfinity: 2 33 | m_RotationOrder: 4 34 | attribute: m_Alpha 35 | path: 36 | classID: 225 37 | script: {fileID: 0} 38 | m_PPtrCurves: [] 39 | m_SampleRate: 60 40 | m_WrapMode: 0 41 | m_Bounds: 42 | m_Center: {x: 0, y: 0, z: 0} 43 | m_Extent: {x: 0, y: 0, z: 0} 44 | m_ClipBindingConstant: 45 | genericBindings: 46 | - serializedVersion: 2 47 | path: 0 48 | attribute: 1574349066 49 | script: {fileID: 0} 50 | typeID: 225 51 | customType: 0 52 | isPPtrCurve: 0 53 | pptrCurveMapping: [] 54 | m_AnimationClipSettings: 55 | serializedVersion: 2 56 | m_AdditiveReferencePoseClip: {fileID: 0} 57 | m_AdditiveReferencePoseTime: 0 58 | m_StartTime: 0 59 | m_StopTime: 0 60 | m_OrientationOffsetY: 0 61 | m_Level: 0 62 | m_CycleOffset: 0 63 | m_HasAdditiveReferencePose: 0 64 | m_LoopTime: 1 65 | m_LoopBlend: 0 66 | m_LoopBlendOrientation: 0 67 | m_LoopBlendPositionY: 0 68 | m_LoopBlendPositionXZ: 0 69 | m_KeepOriginalOrientation: 0 70 | m_KeepOriginalPositionY: 1 71 | m_KeepOriginalPositionXZ: 0 72 | m_HeightFromFeet: 0 73 | m_Mirror: 0 74 | m_EditorCurves: 75 | - curve: 76 | serializedVersion: 2 77 | m_Curve: 78 | - serializedVersion: 3 79 | time: 0 80 | value: 0 81 | inSlope: 0 82 | outSlope: 0 83 | tangentMode: 136 84 | weightedMode: 0 85 | inWeight: 0.33333334 86 | outWeight: 0.33333334 87 | m_PreInfinity: 2 88 | m_PostInfinity: 2 89 | m_RotationOrder: 4 90 | attribute: m_Alpha 91 | path: 92 | classID: 225 93 | script: {fileID: 0} 94 | m_EulerEditorCurves: [] 95 | m_HasGenericRootTransform: 0 96 | m_HasMotionFloatCurves: 0 97 | m_GenerateMotionCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleDisabledIdle.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e1483d14d162c4458a35aa146a48d7f 3 | timeCreated: 1507132185 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 7400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleEnabledIdle.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: ConsoleEnabledIdle 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: [] 16 | m_PositionCurves: [] 17 | m_ScaleCurves: [] 18 | m_FloatCurves: 19 | - curve: 20 | serializedVersion: 2 21 | m_Curve: 22 | - serializedVersion: 3 23 | time: 0 24 | value: 0.9 25 | inSlope: 0 26 | outSlope: 0 27 | tangentMode: 136 28 | weightedMode: 0 29 | inWeight: 0.33333334 30 | outWeight: 0.33333334 31 | m_PreInfinity: 2 32 | m_PostInfinity: 2 33 | m_RotationOrder: 4 34 | attribute: m_Alpha 35 | path: 36 | classID: 225 37 | script: {fileID: 0} 38 | m_PPtrCurves: [] 39 | m_SampleRate: 60 40 | m_WrapMode: 0 41 | m_Bounds: 42 | m_Center: {x: 0, y: 0, z: 0} 43 | m_Extent: {x: 0, y: 0, z: 0} 44 | m_ClipBindingConstant: 45 | genericBindings: 46 | - serializedVersion: 2 47 | path: 0 48 | attribute: 1574349066 49 | script: {fileID: 0} 50 | typeID: 225 51 | customType: 0 52 | isPPtrCurve: 0 53 | pptrCurveMapping: [] 54 | m_AnimationClipSettings: 55 | serializedVersion: 2 56 | m_AdditiveReferencePoseClip: {fileID: 0} 57 | m_AdditiveReferencePoseTime: 0 58 | m_StartTime: 0 59 | m_StopTime: 0 60 | m_OrientationOffsetY: 0 61 | m_Level: 0 62 | m_CycleOffset: 0 63 | m_HasAdditiveReferencePose: 0 64 | m_LoopTime: 1 65 | m_LoopBlend: 0 66 | m_LoopBlendOrientation: 0 67 | m_LoopBlendPositionY: 0 68 | m_LoopBlendPositionXZ: 0 69 | m_KeepOriginalOrientation: 0 70 | m_KeepOriginalPositionY: 1 71 | m_KeepOriginalPositionXZ: 0 72 | m_HeightFromFeet: 0 73 | m_Mirror: 0 74 | m_EditorCurves: 75 | - curve: 76 | serializedVersion: 2 77 | m_Curve: 78 | - serializedVersion: 3 79 | time: 0 80 | value: 0.9 81 | inSlope: 0 82 | outSlope: 0 83 | tangentMode: 136 84 | weightedMode: 0 85 | inWeight: 0.33333334 86 | outWeight: 0.33333334 87 | m_PreInfinity: 2 88 | m_PostInfinity: 2 89 | m_RotationOrder: 4 90 | attribute: m_Alpha 91 | path: 92 | classID: 225 93 | script: {fileID: 0} 94 | m_EulerEditorCurves: [] 95 | m_HasGenericRootTransform: 0 96 | m_HasMotionFloatCurves: 0 97 | m_GenerateMotionCurves: 0 98 | m_Events: [] 99 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleEnabledIdle.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bf79778e014ada4b8754e9177d27b67 3 | timeCreated: 1507132215 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 7400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleHide.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: ConsoleHide 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: [] 16 | m_PositionCurves: [] 17 | m_ScaleCurves: [] 18 | m_FloatCurves: 19 | - curve: 20 | serializedVersion: 2 21 | m_Curve: 22 | - serializedVersion: 3 23 | time: 0 24 | value: 0.9 25 | inSlope: 0 26 | outSlope: 0 27 | tangentMode: 136 28 | weightedMode: 0 29 | inWeight: 0.33333334 30 | outWeight: 0.33333334 31 | - serializedVersion: 3 32 | time: 0.16666667 33 | value: 0 34 | inSlope: 0 35 | outSlope: 0 36 | tangentMode: 136 37 | weightedMode: 0 38 | inWeight: 0.33333334 39 | outWeight: 0.33333334 40 | m_PreInfinity: 2 41 | m_PostInfinity: 2 42 | m_RotationOrder: 4 43 | attribute: m_Alpha 44 | path: 45 | classID: 225 46 | script: {fileID: 0} 47 | m_PPtrCurves: [] 48 | m_SampleRate: 60 49 | m_WrapMode: 0 50 | m_Bounds: 51 | m_Center: {x: 0, y: 0, z: 0} 52 | m_Extent: {x: 0, y: 0, z: 0} 53 | m_ClipBindingConstant: 54 | genericBindings: 55 | - serializedVersion: 2 56 | path: 0 57 | attribute: 1574349066 58 | script: {fileID: 0} 59 | typeID: 225 60 | customType: 0 61 | isPPtrCurve: 0 62 | pptrCurveMapping: [] 63 | m_AnimationClipSettings: 64 | serializedVersion: 2 65 | m_AdditiveReferencePoseClip: {fileID: 0} 66 | m_AdditiveReferencePoseTime: 0 67 | m_StartTime: 0 68 | m_StopTime: 0.16666667 69 | m_OrientationOffsetY: 0 70 | m_Level: 0 71 | m_CycleOffset: 0 72 | m_HasAdditiveReferencePose: 0 73 | m_LoopTime: 1 74 | m_LoopBlend: 0 75 | m_LoopBlendOrientation: 0 76 | m_LoopBlendPositionY: 0 77 | m_LoopBlendPositionXZ: 0 78 | m_KeepOriginalOrientation: 0 79 | m_KeepOriginalPositionY: 1 80 | m_KeepOriginalPositionXZ: 0 81 | m_HeightFromFeet: 0 82 | m_Mirror: 0 83 | m_EditorCurves: 84 | - curve: 85 | serializedVersion: 2 86 | m_Curve: 87 | - serializedVersion: 3 88 | time: 0 89 | value: 0.9 90 | inSlope: 0 91 | outSlope: 0 92 | tangentMode: 136 93 | weightedMode: 0 94 | inWeight: 0.33333334 95 | outWeight: 0.33333334 96 | - serializedVersion: 3 97 | time: 0.16666667 98 | value: 0 99 | inSlope: 0 100 | outSlope: 0 101 | tangentMode: 136 102 | weightedMode: 0 103 | inWeight: 0.33333334 104 | outWeight: 0.33333334 105 | m_PreInfinity: 2 106 | m_PostInfinity: 2 107 | m_RotationOrder: 4 108 | attribute: m_Alpha 109 | path: 110 | classID: 225 111 | script: {fileID: 0} 112 | m_EulerEditorCurves: [] 113 | m_HasGenericRootTransform: 0 114 | m_HasMotionFloatCurves: 0 115 | m_GenerateMotionCurves: 0 116 | m_Events: [] 117 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleHide.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94981eebe6324884993ddb5481b659ca 3 | timeCreated: 1507132386 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 7400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleShow.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: ConsoleShow 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: [] 16 | m_PositionCurves: [] 17 | m_ScaleCurves: [] 18 | m_FloatCurves: 19 | - curve: 20 | serializedVersion: 2 21 | m_Curve: 22 | - serializedVersion: 3 23 | time: 0 24 | value: 0 25 | inSlope: 0 26 | outSlope: 0 27 | tangentMode: 136 28 | weightedMode: 0 29 | inWeight: 0.33333334 30 | outWeight: 0.33333334 31 | - serializedVersion: 3 32 | time: 0.16666667 33 | value: 0.9 34 | inSlope: 0 35 | outSlope: 0 36 | tangentMode: 136 37 | weightedMode: 0 38 | inWeight: 0.33333334 39 | outWeight: 0.33333334 40 | m_PreInfinity: 2 41 | m_PostInfinity: 2 42 | m_RotationOrder: 4 43 | attribute: m_Alpha 44 | path: 45 | classID: 225 46 | script: {fileID: 0} 47 | m_PPtrCurves: [] 48 | m_SampleRate: 60 49 | m_WrapMode: 0 50 | m_Bounds: 51 | m_Center: {x: 0, y: 0, z: 0} 52 | m_Extent: {x: 0, y: 0, z: 0} 53 | m_ClipBindingConstant: 54 | genericBindings: 55 | - serializedVersion: 2 56 | path: 0 57 | attribute: 1574349066 58 | script: {fileID: 0} 59 | typeID: 225 60 | customType: 0 61 | isPPtrCurve: 0 62 | pptrCurveMapping: [] 63 | m_AnimationClipSettings: 64 | serializedVersion: 2 65 | m_AdditiveReferencePoseClip: {fileID: 0} 66 | m_AdditiveReferencePoseTime: 0 67 | m_StartTime: 0 68 | m_StopTime: 0.16666667 69 | m_OrientationOffsetY: 0 70 | m_Level: 0 71 | m_CycleOffset: 0 72 | m_HasAdditiveReferencePose: 0 73 | m_LoopTime: 1 74 | m_LoopBlend: 0 75 | m_LoopBlendOrientation: 0 76 | m_LoopBlendPositionY: 0 77 | m_LoopBlendPositionXZ: 0 78 | m_KeepOriginalOrientation: 0 79 | m_KeepOriginalPositionY: 1 80 | m_KeepOriginalPositionXZ: 0 81 | m_HeightFromFeet: 0 82 | m_Mirror: 0 83 | m_EditorCurves: 84 | - curve: 85 | serializedVersion: 2 86 | m_Curve: 87 | - serializedVersion: 3 88 | time: 0 89 | value: 0 90 | inSlope: 0 91 | outSlope: 0 92 | tangentMode: 136 93 | weightedMode: 0 94 | inWeight: 0.33333334 95 | outWeight: 0.33333334 96 | - serializedVersion: 3 97 | time: 0.16666667 98 | value: 0.9 99 | inSlope: 0 100 | outSlope: 0 101 | tangentMode: 136 102 | weightedMode: 0 103 | inWeight: 0.33333334 104 | outWeight: 0.33333334 105 | m_PreInfinity: 2 106 | m_PostInfinity: 2 107 | m_RotationOrder: 4 108 | attribute: m_Alpha 109 | path: 110 | classID: 225 111 | script: {fileID: 0} 112 | m_EulerEditorCurves: [] 113 | m_HasGenericRootTransform: 0 114 | m_HasMotionFloatCurves: 0 115 | m_GenerateMotionCurves: 0 116 | m_Events: [] 117 | -------------------------------------------------------------------------------- /Assets/Animations/Console/ConsoleShow.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac0140abaea7ec34f9fa2bab9638e6f3 3 | timeCreated: 1507132241 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 7400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7aa3d984df797954786ec3a63ec2be00 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebf576f7aafd07b4ca9e1e45787750fc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Example/CubeMat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: CubeMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.9490196, g: 0.69411767, b: 0.20392157, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/Example/CubeMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fe852ba74a9aeb40bb3e503d82ba8b5 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Example/LevelDarkMat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: LevelDarkMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 02dba095125c86f49a68c21f9b881627, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.4056604, g: 0.4056604, b: 0.4056604, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/Example/LevelDarkMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c4d221bcee0e4244b5536ea1d0781e7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Example/LevelLightMat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: LevelLightMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 26e38758943309a4d89ebcdf69072a91, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/Example/LevelLightMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f23df3e1b67f1b0449e668a8b1bee2de 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 586f847a056af274da7d36046bef3c80 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Console.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f81662da834e6a47ae127a0fad41739 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Console/Console.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1117157207591462 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 224821719520202754} 12 | - component: {fileID: 222931389215027678} 13 | - component: {fileID: 114377074958403426} 14 | m_Layer: 5 15 | m_Name: Input 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &224821719520202754 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 1117157207591462} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 224610245195119282} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | m_AnchorMin: {x: 0, y: 0} 36 | m_AnchorMax: {x: 1, y: 1} 37 | m_AnchoredPosition: {x: 2.5, y: 0} 38 | m_SizeDelta: {x: -5, y: 0} 39 | m_Pivot: {x: 0.5, y: 0.5} 40 | --- !u!222 &222931389215027678 41 | CanvasRenderer: 42 | m_ObjectHideFlags: 0 43 | m_CorrespondingSourceObject: {fileID: 0} 44 | m_PrefabInstance: {fileID: 0} 45 | m_PrefabAsset: {fileID: 0} 46 | m_GameObject: {fileID: 1117157207591462} 47 | m_CullTransparentMesh: 0 48 | --- !u!114 &114377074958403426 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 1117157207591462} 55 | m_Enabled: 1 56 | m_EditorHideFlags: 0 57 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 58 | m_Name: 59 | m_EditorClassIdentifier: 60 | m_Material: {fileID: 0} 61 | m_Color: {r: 0, g: 0, b: 0, a: 1} 62 | m_RaycastTarget: 1 63 | m_OnCullStateChanged: 64 | m_PersistentCalls: 65 | m_Calls: [] 66 | m_FontData: 67 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 68 | m_FontSize: 14 69 | m_FontStyle: 0 70 | m_BestFit: 1 71 | m_MinSize: 11 72 | m_MaxSize: 14 73 | m_Alignment: 3 74 | m_AlignByGeometry: 0 75 | m_RichText: 0 76 | m_HorizontalOverflow: 1 77 | m_VerticalOverflow: 0 78 | m_LineSpacing: 1 79 | m_Text: 80 | --- !u!1 &1288808315495784 81 | GameObject: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | serializedVersion: 6 87 | m_Component: 88 | - component: {fileID: 224463688881281336} 89 | - component: {fileID: 222410373376015094} 90 | - component: {fileID: 114978806635254696} 91 | - component: {fileID: 114577636812099652} 92 | m_Layer: 5 93 | m_Name: Output 94 | m_TagString: Untagged 95 | m_Icon: {fileID: 0} 96 | m_NavMeshLayer: 0 97 | m_StaticEditorFlags: 0 98 | m_IsActive: 1 99 | --- !u!224 &224463688881281336 100 | RectTransform: 101 | m_ObjectHideFlags: 0 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInstance: {fileID: 0} 104 | m_PrefabAsset: {fileID: 0} 105 | m_GameObject: {fileID: 1288808315495784} 106 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 107 | m_LocalPosition: {x: 0, y: 0, z: 0} 108 | m_LocalScale: {x: 1, y: 1, z: 1} 109 | m_Children: [] 110 | m_Father: {fileID: 224995589260172240} 111 | m_RootOrder: 0 112 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 113 | m_AnchorMin: {x: 0, y: 0} 114 | m_AnchorMax: {x: 1, y: 1} 115 | m_AnchoredPosition: {x: 2.5, y: 4.205002} 116 | m_SizeDelta: {x: -5, y: -8.409985} 117 | m_Pivot: {x: 0.5, y: 0.5} 118 | --- !u!222 &222410373376015094 119 | CanvasRenderer: 120 | m_ObjectHideFlags: 0 121 | m_CorrespondingSourceObject: {fileID: 0} 122 | m_PrefabInstance: {fileID: 0} 123 | m_PrefabAsset: {fileID: 0} 124 | m_GameObject: {fileID: 1288808315495784} 125 | m_CullTransparentMesh: 0 126 | --- !u!114 &114978806635254696 127 | MonoBehaviour: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_GameObject: {fileID: 1288808315495784} 133 | m_Enabled: 1 134 | m_EditorHideFlags: 0 135 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 136 | m_Name: 137 | m_EditorClassIdentifier: 138 | m_Material: {fileID: 0} 139 | m_Color: {r: 0, g: 0, b: 0, a: 1} 140 | m_RaycastTarget: 1 141 | m_OnCullStateChanged: 142 | m_PersistentCalls: 143 | m_Calls: [] 144 | m_FontData: 145 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 146 | m_FontSize: 14 147 | m_FontStyle: 0 148 | m_BestFit: 0 149 | m_MinSize: 0 150 | m_MaxSize: 116 151 | m_Alignment: 6 152 | m_AlignByGeometry: 0 153 | m_RichText: 1 154 | m_HorizontalOverflow: 0 155 | m_VerticalOverflow: 1 156 | m_LineSpacing: 1.22 157 | m_Text: 158 | --- !u!114 &114577636812099652 159 | MonoBehaviour: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 1288808315495784} 165 | m_Enabled: 1 166 | m_EditorHideFlags: 0 167 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 168 | m_Name: 169 | m_EditorClassIdentifier: 170 | m_IgnoreLayout: 0 171 | m_MinWidth: -1 172 | m_MinHeight: -1 173 | m_PreferredWidth: -1 174 | m_PreferredHeight: -1 175 | m_FlexibleWidth: -1 176 | m_FlexibleHeight: 1 177 | m_LayoutPriority: 1 178 | --- !u!1 &1519667901743868 179 | GameObject: 180 | m_ObjectHideFlags: 0 181 | m_CorrespondingSourceObject: {fileID: 0} 182 | m_PrefabInstance: {fileID: 0} 183 | m_PrefabAsset: {fileID: 0} 184 | serializedVersion: 6 185 | m_Component: 186 | - component: {fileID: 224995589260172240} 187 | - component: {fileID: 222033407412477698} 188 | - component: {fileID: 114403548844107600} 189 | - component: {fileID: 114781661814605540} 190 | - component: {fileID: 114472051250591368} 191 | m_Layer: 5 192 | m_Name: OutputField 193 | m_TagString: Untagged 194 | m_Icon: {fileID: 0} 195 | m_NavMeshLayer: 0 196 | m_StaticEditorFlags: 0 197 | m_IsActive: 1 198 | --- !u!224 &224995589260172240 199 | RectTransform: 200 | m_ObjectHideFlags: 0 201 | m_CorrespondingSourceObject: {fileID: 0} 202 | m_PrefabInstance: {fileID: 0} 203 | m_PrefabAsset: {fileID: 0} 204 | m_GameObject: {fileID: 1519667901743868} 205 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 206 | m_LocalPosition: {x: 0, y: 0, z: 0} 207 | m_LocalScale: {x: 1, y: 1, z: 1} 208 | m_Children: 209 | - {fileID: 224463688881281336} 210 | m_Father: {fileID: 224776946140837980} 211 | m_RootOrder: 0 212 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 213 | m_AnchorMin: {x: 0, y: 1} 214 | m_AnchorMax: {x: 0, y: 1} 215 | m_AnchoredPosition: {x: 5, y: -129.47} 216 | m_SizeDelta: {x: 1628, y: 248.94} 217 | m_Pivot: {x: 0, y: 0.5} 218 | --- !u!222 &222033407412477698 219 | CanvasRenderer: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | m_GameObject: {fileID: 1519667901743868} 225 | m_CullTransparentMesh: 0 226 | --- !u!114 &114403548844107600 227 | MonoBehaviour: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | m_GameObject: {fileID: 1519667901743868} 233 | m_Enabled: 1 234 | m_EditorHideFlags: 0 235 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 236 | m_Name: 237 | m_EditorClassIdentifier: 238 | m_Material: {fileID: 0} 239 | m_Color: {r: 1, g: 1, b: 1, a: 1} 240 | m_RaycastTarget: 0 241 | m_OnCullStateChanged: 242 | m_PersistentCalls: 243 | m_Calls: [] 244 | m_Sprite: {fileID: 0} 245 | m_Type: 1 246 | m_PreserveAspect: 0 247 | m_FillCenter: 1 248 | m_FillMethod: 4 249 | m_FillAmount: 1 250 | m_FillClockwise: 1 251 | m_FillOrigin: 0 252 | m_UseSpriteMesh: 0 253 | m_PixelsPerUnitMultiplier: 1 254 | --- !u!114 &114781661814605540 255 | MonoBehaviour: 256 | m_ObjectHideFlags: 0 257 | m_CorrespondingSourceObject: {fileID: 0} 258 | m_PrefabInstance: {fileID: 0} 259 | m_PrefabAsset: {fileID: 0} 260 | m_GameObject: {fileID: 1519667901743868} 261 | m_Enabled: 1 262 | m_EditorHideFlags: 0 263 | m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} 264 | m_Name: 265 | m_EditorClassIdentifier: 266 | --- !u!114 &114472051250591368 267 | MonoBehaviour: 268 | m_ObjectHideFlags: 0 269 | m_CorrespondingSourceObject: {fileID: 0} 270 | m_PrefabInstance: {fileID: 0} 271 | m_PrefabAsset: {fileID: 0} 272 | m_GameObject: {fileID: 1519667901743868} 273 | m_Enabled: 1 274 | m_EditorHideFlags: 0 275 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 276 | m_Name: 277 | m_EditorClassIdentifier: 278 | m_IgnoreLayout: 0 279 | m_MinWidth: -1 280 | m_MinHeight: -1 281 | m_PreferredWidth: -1 282 | m_PreferredHeight: -1 283 | m_FlexibleWidth: -1 284 | m_FlexibleHeight: 1 285 | m_LayoutPriority: 1 286 | --- !u!1 &1963310362090744 287 | GameObject: 288 | m_ObjectHideFlags: 0 289 | m_CorrespondingSourceObject: {fileID: 0} 290 | m_PrefabInstance: {fileID: 0} 291 | m_PrefabAsset: {fileID: 0} 292 | serializedVersion: 6 293 | m_Component: 294 | - component: {fileID: 224610245195119282} 295 | - component: {fileID: 222662441423459110} 296 | - component: {fileID: 114589800295884110} 297 | - component: {fileID: 114123234199170210} 298 | - component: {fileID: 114756457132990724} 299 | m_Layer: 5 300 | m_Name: InputField 301 | m_TagString: Untagged 302 | m_Icon: {fileID: 0} 303 | m_NavMeshLayer: 0 304 | m_StaticEditorFlags: 0 305 | m_IsActive: 1 306 | --- !u!224 &224610245195119282 307 | RectTransform: 308 | m_ObjectHideFlags: 0 309 | m_CorrespondingSourceObject: {fileID: 0} 310 | m_PrefabInstance: {fileID: 0} 311 | m_PrefabAsset: {fileID: 0} 312 | m_GameObject: {fileID: 1963310362090744} 313 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 314 | m_LocalPosition: {x: 0, y: 0, z: 0} 315 | m_LocalScale: {x: 1, y: 1, z: 1} 316 | m_Children: 317 | - {fileID: 224821719520202754} 318 | m_Father: {fileID: 224776946140837980} 319 | m_RootOrder: 1 320 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 321 | m_AnchorMin: {x: 0, y: 1} 322 | m_AnchorMax: {x: 0, y: 1} 323 | m_AnchoredPosition: {x: 819, y: -278.94} 324 | m_SizeDelta: {x: 1628, y: 25} 325 | m_Pivot: {x: 0.5, y: 0} 326 | --- !u!222 &222662441423459110 327 | CanvasRenderer: 328 | m_ObjectHideFlags: 0 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInstance: {fileID: 0} 331 | m_PrefabAsset: {fileID: 0} 332 | m_GameObject: {fileID: 1963310362090744} 333 | m_CullTransparentMesh: 0 334 | --- !u!114 &114589800295884110 335 | MonoBehaviour: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | m_GameObject: {fileID: 1963310362090744} 341 | m_Enabled: 1 342 | m_EditorHideFlags: 0 343 | m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} 344 | m_Name: 345 | m_EditorClassIdentifier: 346 | m_Navigation: 347 | m_Mode: 3 348 | m_SelectOnUp: {fileID: 0} 349 | m_SelectOnDown: {fileID: 0} 350 | m_SelectOnLeft: {fileID: 0} 351 | m_SelectOnRight: {fileID: 0} 352 | m_Transition: 0 353 | m_Colors: 354 | m_NormalColor: {r: 1, g: 1, b: 1, a: 0.566} 355 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 356 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 357 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 358 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 359 | m_ColorMultiplier: 1 360 | m_FadeDuration: 0.1 361 | m_SpriteState: 362 | m_HighlightedSprite: {fileID: 0} 363 | m_PressedSprite: {fileID: 0} 364 | m_SelectedSprite: {fileID: 0} 365 | m_DisabledSprite: {fileID: 0} 366 | m_AnimationTriggers: 367 | m_NormalTrigger: Normal 368 | m_HighlightedTrigger: Highlighted 369 | m_PressedTrigger: Pressed 370 | m_SelectedTrigger: Highlighted 371 | m_DisabledTrigger: Disabled 372 | m_Interactable: 1 373 | m_TargetGraphic: {fileID: 114756457132990724} 374 | m_TextComponent: {fileID: 114377074958403426} 375 | m_Placeholder: {fileID: 0} 376 | m_ContentType: 0 377 | m_InputType: 0 378 | m_AsteriskChar: 42 379 | m_KeyboardType: 0 380 | m_LineType: 0 381 | m_HideMobileInput: 0 382 | m_CharacterValidation: 0 383 | m_CharacterLimit: 0 384 | m_OnEndEdit: 385 | m_PersistentCalls: 386 | m_Calls: [] 387 | m_OnValueChanged: 388 | m_PersistentCalls: 389 | m_Calls: [] 390 | m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 391 | m_CustomCaretColor: 0 392 | m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} 393 | m_Text: 394 | m_CaretBlinkRate: 1 395 | m_CaretWidth: 1 396 | m_ReadOnly: 0 397 | --- !u!114 &114123234199170210 398 | MonoBehaviour: 399 | m_ObjectHideFlags: 0 400 | m_CorrespondingSourceObject: {fileID: 0} 401 | m_PrefabInstance: {fileID: 0} 402 | m_PrefabAsset: {fileID: 0} 403 | m_GameObject: {fileID: 1963310362090744} 404 | m_Enabled: 1 405 | m_EditorHideFlags: 0 406 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 407 | m_Name: 408 | m_EditorClassIdentifier: 409 | m_IgnoreLayout: 0 410 | m_MinWidth: -1 411 | m_MinHeight: 25 412 | m_PreferredWidth: -1 413 | m_PreferredHeight: -1 414 | m_FlexibleWidth: -1 415 | m_FlexibleHeight: 0 416 | m_LayoutPriority: 1 417 | --- !u!114 &114756457132990724 418 | MonoBehaviour: 419 | m_ObjectHideFlags: 0 420 | m_CorrespondingSourceObject: {fileID: 0} 421 | m_PrefabInstance: {fileID: 0} 422 | m_PrefabAsset: {fileID: 0} 423 | m_GameObject: {fileID: 1963310362090744} 424 | m_Enabled: 1 425 | m_EditorHideFlags: 0 426 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 427 | m_Name: 428 | m_EditorClassIdentifier: 429 | m_Material: {fileID: 0} 430 | m_Color: {r: 0.9117647, g: 0.9117647, b: 0.9117647, a: 1} 431 | m_RaycastTarget: 1 432 | m_OnCullStateChanged: 433 | m_PersistentCalls: 434 | m_Calls: [] 435 | m_Sprite: {fileID: 0} 436 | m_Type: 0 437 | m_PreserveAspect: 0 438 | m_FillCenter: 1 439 | m_FillMethod: 4 440 | m_FillAmount: 1 441 | m_FillClockwise: 1 442 | m_FillOrigin: 0 443 | m_UseSpriteMesh: 0 444 | m_PixelsPerUnitMultiplier: 1 445 | --- !u!1 &1973097496047182 446 | GameObject: 447 | m_ObjectHideFlags: 0 448 | m_CorrespondingSourceObject: {fileID: 0} 449 | m_PrefabInstance: {fileID: 0} 450 | m_PrefabAsset: {fileID: 0} 451 | serializedVersion: 6 452 | m_Component: 453 | - component: {fileID: 224776946140837980} 454 | - component: {fileID: 222439528717422480} 455 | - component: {fileID: 114214644980205498} 456 | - component: {fileID: 114266614866986558} 457 | - component: {fileID: 114433972584354904} 458 | - component: {fileID: 114236526542159200} 459 | - component: {fileID: 225365798623430200} 460 | - component: {fileID: 95701190638853404} 461 | m_Layer: 5 462 | m_Name: Console 463 | m_TagString: Untagged 464 | m_Icon: {fileID: 0} 465 | m_NavMeshLayer: 0 466 | m_StaticEditorFlags: 0 467 | m_IsActive: 1 468 | --- !u!224 &224776946140837980 469 | RectTransform: 470 | m_ObjectHideFlags: 0 471 | m_CorrespondingSourceObject: {fileID: 0} 472 | m_PrefabInstance: {fileID: 0} 473 | m_PrefabAsset: {fileID: 0} 474 | m_GameObject: {fileID: 1973097496047182} 475 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 476 | m_LocalPosition: {x: 0, y: 0, z: 0} 477 | m_LocalScale: {x: 1, y: 1, z: 1} 478 | m_Children: 479 | - {fileID: 224995589260172240} 480 | - {fileID: 224610245195119282} 481 | m_Father: {fileID: 0} 482 | m_RootOrder: 0 483 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 484 | m_AnchorMin: {x: 0, y: 1} 485 | m_AnchorMax: {x: 1, y: 1} 486 | m_AnchoredPosition: {x: 0, y: 0} 487 | m_SizeDelta: {x: 0, y: 283.94} 488 | m_Pivot: {x: 0.5, y: 1} 489 | --- !u!222 &222439528717422480 490 | CanvasRenderer: 491 | m_ObjectHideFlags: 0 492 | m_CorrespondingSourceObject: {fileID: 0} 493 | m_PrefabInstance: {fileID: 0} 494 | m_PrefabAsset: {fileID: 0} 495 | m_GameObject: {fileID: 1973097496047182} 496 | m_CullTransparentMesh: 0 497 | --- !u!114 &114214644980205498 498 | MonoBehaviour: 499 | m_ObjectHideFlags: 0 500 | m_CorrespondingSourceObject: {fileID: 0} 501 | m_PrefabInstance: {fileID: 0} 502 | m_PrefabAsset: {fileID: 0} 503 | m_GameObject: {fileID: 1973097496047182} 504 | m_Enabled: 1 505 | m_EditorHideFlags: 0 506 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 507 | m_Name: 508 | m_EditorClassIdentifier: 509 | m_Material: {fileID: 0} 510 | m_Color: {r: 0, g: 0, b: 0, a: 0.197} 511 | m_RaycastTarget: 1 512 | m_OnCullStateChanged: 513 | m_PersistentCalls: 514 | m_Calls: [] 515 | m_Sprite: {fileID: 0} 516 | m_Type: 1 517 | m_PreserveAspect: 0 518 | m_FillCenter: 1 519 | m_FillMethod: 4 520 | m_FillAmount: 1 521 | m_FillClockwise: 1 522 | m_FillOrigin: 0 523 | m_UseSpriteMesh: 0 524 | m_PixelsPerUnitMultiplier: 1 525 | --- !u!114 &114266614866986558 526 | MonoBehaviour: 527 | m_ObjectHideFlags: 0 528 | m_CorrespondingSourceObject: {fileID: 0} 529 | m_PrefabInstance: {fileID: 0} 530 | m_PrefabAsset: {fileID: 0} 531 | m_GameObject: {fileID: 1973097496047182} 532 | m_Enabled: 1 533 | m_EditorHideFlags: 0 534 | m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} 535 | m_Name: 536 | m_EditorClassIdentifier: 537 | m_Padding: 538 | m_Left: 5 539 | m_Right: 5 540 | m_Top: 5 541 | m_Bottom: 5 542 | m_ChildAlignment: 0 543 | m_Spacing: 0 544 | m_ChildForceExpandWidth: 1 545 | m_ChildForceExpandHeight: 0 546 | m_ChildControlWidth: 1 547 | m_ChildControlHeight: 1 548 | m_ChildScaleWidth: 0 549 | m_ChildScaleHeight: 0 550 | --- !u!114 &114433972584354904 551 | MonoBehaviour: 552 | m_ObjectHideFlags: 0 553 | m_CorrespondingSourceObject: {fileID: 0} 554 | m_PrefabInstance: {fileID: 0} 555 | m_PrefabAsset: {fileID: 0} 556 | m_GameObject: {fileID: 1973097496047182} 557 | m_Enabled: 1 558 | m_EditorHideFlags: 0 559 | m_Script: {fileID: 11500000, guid: cbb6f88eed0554c4baaca8a704f818d0, type: 3} 560 | m_Name: 561 | m_EditorClassIdentifier: 562 | --- !u!114 &114236526542159200 563 | MonoBehaviour: 564 | m_ObjectHideFlags: 0 565 | m_CorrespondingSourceObject: {fileID: 0} 566 | m_PrefabInstance: {fileID: 0} 567 | m_PrefabAsset: {fileID: 0} 568 | m_GameObject: {fileID: 1973097496047182} 569 | m_Enabled: 1 570 | m_EditorHideFlags: 0 571 | m_Script: {fileID: 11500000, guid: 9903e662d006226449d2236047e02216, type: 3} 572 | m_Name: 573 | m_EditorClassIdentifier: 574 | _input: {fileID: 114589800295884110} 575 | _outputText: {fileID: 114978806635254696} 576 | _consoleToggleKey: 9 577 | _inputHistoryCapacity: 10 578 | _errorColor: {r: 1, g: 0, b: 0, a: 0} 579 | _infoColor: {r: 0.11764707, g: 0.38431373, b: 0.80784315, a: 0} 580 | _warningColor: {r: 0.6666667, g: 0.5294118, b: 0.11764706, a: 0} 581 | --- !u!225 &225365798623430200 582 | CanvasGroup: 583 | m_ObjectHideFlags: 0 584 | m_CorrespondingSourceObject: {fileID: 0} 585 | m_PrefabInstance: {fileID: 0} 586 | m_PrefabAsset: {fileID: 0} 587 | m_GameObject: {fileID: 1973097496047182} 588 | m_Enabled: 1 589 | m_Alpha: 1 590 | m_Interactable: 1 591 | m_BlocksRaycasts: 1 592 | m_IgnoreParentGroups: 0 593 | --- !u!95 &95701190638853404 594 | Animator: 595 | serializedVersion: 3 596 | m_ObjectHideFlags: 0 597 | m_CorrespondingSourceObject: {fileID: 0} 598 | m_PrefabInstance: {fileID: 0} 599 | m_PrefabAsset: {fileID: 0} 600 | m_GameObject: {fileID: 1973097496047182} 601 | m_Enabled: 1 602 | m_Avatar: {fileID: 0} 603 | m_Controller: {fileID: 9100000, guid: fe23686e437aeff4f8edf6e69cb030f5, type: 2} 604 | m_CullingMode: 0 605 | m_UpdateMode: 0 606 | m_ApplyRootMotion: 0 607 | m_LinearVelocityBlending: 0 608 | m_WarningMessage: 609 | m_HasTransformHierarchy: 1 610 | m_AllowConstantClipSamplingOptimization: 1 611 | m_KeepAnimatorControllerStateOnDisable: 0 612 | -------------------------------------------------------------------------------- /Assets/Prefabs/Console/Console.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9e109f5bfd8c694fa57bdad25c24df2 3 | timeCreated: 1518529608 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Prefabs/Console/NetworkConsole.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1748772945650462} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1748772945650462 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4001611436347870} 22 | - component: {fileID: 114173754616152330} 23 | - component: {fileID: 114194252144911664} 24 | m_Layer: 5 25 | m_Name: NetworkConsole 26 | m_TagString: Untagged 27 | m_Icon: {fileID: -1412012063857583412, guid: 0000000000000000d000000000000000, type: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 0 31 | --- !u!4 &4001611436347870 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1748772945650462} 37 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 38 | m_LocalPosition: {x: 5.25, y: -1.75, z: 10} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!114 &114173754616152330 45 | MonoBehaviour: 46 | m_ObjectHideFlags: 1 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1748772945650462} 50 | m_Enabled: 1 51 | m_EditorHideFlags: 0 52 | m_Script: {fileID: 11500000, guid: cbb6f88eed0554c4baaca8a704f818d0, type: 3} 53 | m_Name: 54 | m_EditorClassIdentifier: 55 | --- !u!114 &114194252144911664 56 | MonoBehaviour: 57 | m_ObjectHideFlags: 1 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInternal: {fileID: 100100000} 60 | m_GameObject: {fileID: 1748772945650462} 61 | m_Enabled: 1 62 | m_EditorHideFlags: 0 63 | m_Script: {fileID: 11500000, guid: efa778a40cf0b404bafeb2c3abcbdee9, type: 3} 64 | m_Name: 65 | m_EditorClassIdentifier: 66 | ip: 127.0.0.1 67 | port: 6001 68 | logDebugInfo: 1 69 | -------------------------------------------------------------------------------- /Assets/Prefabs/Console/NetworkConsole.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f2676c694fa92c4981c5cbe6b92bb45 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41c227de676e75f46b1ac48a356fafcd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Example/Level.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1116070848393148} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1116070848393148 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4435088406047818} 22 | - component: {fileID: 33269852602127398} 23 | - component: {fileID: 23014493198495306} 24 | m_Layer: 0 25 | m_Name: Level 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4435088406047818 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1116070848393148} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!23 &23014493198495306 45 | MeshRenderer: 46 | m_ObjectHideFlags: 1 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1116070848393148} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_DynamicOccludee: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_RenderingLayerMask: 4294967295 58 | m_Materials: 59 | - {fileID: 2100000, guid: 0c4d221bcee0e4244b5536ea1d0781e7, type: 2} 60 | - {fileID: 2100000, guid: f23df3e1b67f1b0449e668a8b1bee2de, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 0 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!33 &33269852602127398 81 | MeshFilter: 82 | m_ObjectHideFlags: 1 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1116070848393148} 86 | m_Mesh: {fileID: 4300000, guid: bbc5e398b9634ba4da6c0179d75308a3, type: 2} 87 | -------------------------------------------------------------------------------- /Assets/Prefabs/Example/Level.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 997c0c2a1d68ebd4e99e39ec50d3e5f9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Example/pb_Mesh17774.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbc5e398b9634ba4da6c0179d75308a3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProBuilder Data.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99ebe34464e8d654aac7070688ad94a5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProBuilder Data/ProBuilderPreferences.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 680703436, guid: 4f0627da958b4bb78c260446066f065f, type: 3} 12 | m_Name: ProBuilderPreferences 13 | m_EditorClassIdentifier: 14 | m_Bool_keys: [] 15 | m_Int_keys: [] 16 | m_Float_keys: [] 17 | m_String_keys: [] 18 | m_Color_keys: [] 19 | m_Material_keys: [] 20 | m_Bool_values: 21 | m_Int_values: 22 | m_Float_values: [] 23 | m_String_values: [] 24 | m_Color_values: [] 25 | m_Material_values: [] 26 | -------------------------------------------------------------------------------- /Assets/ProBuilder Data/ProBuilderPreferences.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cb1e09c3181d1d489138635056bc54c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 848389817202ea54b9e7156e40f5e305 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40074c9868021514695a19eb5fa1e4cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Args.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a029a66690dd08d4493bcd1410929734 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Args/VisibilityChangedArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | public class VisibilityChangedArgs : EventArgs 6 | { 7 | public VisibilityChangedArgs(bool newVisibility) 8 | { 9 | Visibility = newVisibility; 10 | } 11 | 12 | public bool Visibility { get; private set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Args/VisibilityChangedArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c3d34b1759408949ac6993a5f0f98ce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00cc57a773440bc419117a51cd2af1f7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConsoleMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | [AttributeUsage(AttributeTargets.Method)] 6 | public class ConsoleMethod : Attribute 7 | { 8 | private readonly string command; 9 | private readonly string descr; 10 | 11 | public ConsoleMethod(string command, string descr) 12 | { 13 | this.command = command; 14 | this.descr = descr; 15 | } 16 | 17 | public ConsoleMethod(string command) : this(command, "No description available.") 18 | { 19 | } 20 | 21 | public string Command 22 | { 23 | get { return command; } 24 | } 25 | 26 | public string Description 27 | { 28 | get { return descr; } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConsoleMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a26c0dfa83ffb404b9d260658fe8dd79 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConsoleParameter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | [AttributeUsage(AttributeTargets.Parameter)] 6 | public class ConsoleParameter : Attribute 7 | { 8 | private readonly string descr; 9 | 10 | public ConsoleParameter(string descr) 11 | { 12 | this.descr = descr; 13 | } 14 | 15 | public string Description 16 | { 17 | get { return descr; } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConsoleParameter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c603a39cd7f760b4b804d359b9292e26 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConversionMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | [AttributeUsage(AttributeTargets.Method)] 6 | public class ConversionMethod : Attribute 7 | { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ConversionMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37ead7538c7562b49979fc08695d371a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ExecutableFromConsole.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | [AttributeUsage(AttributeTargets.Class)] 6 | public class ExecutableFromConsole : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Attributes/ExecutableFromConsole.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ae9c18d91cd1ab40aacd20060a39e65 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/ConsoleLogic.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | using UnityEngine; 4 | using System.Linq; 5 | using System; 6 | 7 | namespace IngameConsole 8 | { 9 | [ExecutableFromConsole] 10 | [RequireComponent(typeof(BaseConsoleIO))] 11 | public class ConsoleLogic : MonoBehaviour 12 | { 13 | private BaseConsoleIO _consoleIO; 14 | private BaseWriter _consoleWriter; 15 | 16 | void Awake() 17 | { 18 | //Connect with IO 19 | _consoleIO = GetComponent(typeof(BaseConsoleIO)) as BaseConsoleIO; 20 | _consoleIO.InputReceived += OnInputReceived; 21 | } 22 | 23 | private void Start() 24 | { 25 | //Initialize writer 26 | FormattedWriter.Initialize(); 27 | _consoleWriter = new FormattedWriter(); 28 | 29 | //Init IO 30 | _consoleIO.SelectInput(); 31 | ShowInitializationMessage(); 32 | } 33 | 34 | #region Intialization message 35 | 36 | private void ShowInitializationMessage() 37 | { 38 | _consoleWriter.WriteInfo("Console has been initialized"); 39 | _consoleWriter.WriteInfo("Write help for a list of all commands."); 40 | _consoleWriter.WriteInfo("Write chelp command to get further info on a specific command."); 41 | 42 | if (_consoleIO is ConsoleIO) 43 | { 44 | _consoleWriter.WriteInfo(string.Format("Press {0} to close console window.", (_consoleIO as ConsoleIO).ToggleKey.ToString())); 45 | } 46 | } 47 | 48 | #endregion 49 | 50 | #region Handle input 51 | 52 | private void OnInputReceived(object sender, InputReceivedEventArgs args) 53 | { 54 | _consoleWriter.WriteLineItalic("> " + args.Input); 55 | 56 | try 57 | { 58 | ExecuteLine(_consoleIO.Input); 59 | } 60 | catch (Exception e) 61 | { 62 | if (e.Message != string.Empty) 63 | { 64 | _consoleWriter.WriteError(e.Message); 65 | } 66 | } 67 | finally 68 | { 69 | _consoleIO.ClearInput(); 70 | _consoleIO.SelectInput(); 71 | } 72 | } 73 | 74 | private IEnumerable SplitParameters(string input) 75 | { 76 | //Implementation of the escape sequence \" 77 | //Any occurence of \" will be replaced by a substitution string 78 | //This string will be replaced with a quote after separation is complete 79 | string quoteSubstitution = ">##>"; 80 | input = input.Replace(@"\""", quoteSubstitution); 81 | 82 | //There has to be an even number of quotes (opening and closing) 83 | if (input.Count(c => c == '"') % 2 != 0) 84 | { 85 | throw new Exception("Invalid string format."); 86 | } 87 | 88 | var splitsByQuote = input.Split('"'); 89 | var parameters = new List(); 90 | 91 | for (int i = 0; i < splitsByQuote.Count(); i++) 92 | { 93 | //Splitting by quotes will result in list with a pattern of 94 | //alternating (empty string or string) and (quoted string) 95 | //Empty strings can be ignored 96 | if (i % 2 == 0) 97 | { 98 | //Normal parameters 99 | var splitsBySpace = splitsByQuote[i].Trim(' ').Split(' ').Where(s => s != string.Empty); 100 | parameters.AddRange(splitsBySpace); 101 | } 102 | else 103 | { 104 | //Quoted parameters 105 | parameters.Add(splitsByQuote[i]); 106 | } 107 | } 108 | 109 | parameters = parameters.Select(s => s.Replace(quoteSubstitution, @"""")).ToList(); 110 | return parameters; 111 | } 112 | 113 | #endregion 114 | 115 | #region Reflection 116 | 117 | private IEnumerable FindExecutableTypes() 118 | { 119 | var localAssembly = Assembly.GetAssembly(typeof(ConsoleLogic)); 120 | var executableTypes = localAssembly.GetTypes().Where(_ => _.IsDefined(typeof(ExecutableFromConsole), false)).ToList(); 121 | return executableTypes; 122 | } 123 | 124 | private bool TryFindExecutableInstanceOfType(Type type, out object instance) 125 | { 126 | var instances = FindObjectsOfType(type); 127 | instance = instances.FirstOrDefault(); 128 | 129 | //Check for ambiguity 130 | if (instances.Count() > 1) 131 | { 132 | var gameObjectName = (instance as UnityEngine.Object).name; 133 | _consoleWriter.WriteWarning(string.Format("More than one instance found for type {0}. Choosing {1} for execution.", type.ToString(), gameObjectName)); 134 | } 135 | 136 | return instance != null; 137 | } 138 | 139 | private void FindCmdMethod(string command, out MethodInfo minfo, out ConsoleMethod cmethod) 140 | { 141 | MethodInfo[] methods = CommandMethods; 142 | 143 | minfo = null; 144 | cmethod = null; 145 | 146 | foreach (MethodInfo method in methods) 147 | { 148 | ConsoleMethod[] attributes = method.GetCustomAttributes(typeof(ConsoleMethod), false) as ConsoleMethod[]; 149 | if (attributes != null && attributes.Length > 0) 150 | { 151 | if (attributes[0].Command == command) 152 | { 153 | minfo = method; 154 | cmethod = attributes[0]; 155 | } 156 | } 157 | } 158 | } 159 | 160 | public void ExecuteLine(string line) 161 | { 162 | string[] parameters = SplitParameters(line).ToArray(); 163 | 164 | if (parameters.Count() == 0) 165 | { 166 | throw new Exception("Empty input."); 167 | } 168 | 169 | string command = parameters[0]; 170 | 171 | MethodInfo targetMethod; 172 | ConsoleMethod targetAttribute; 173 | 174 | FindCmdMethod(command, out targetMethod, out targetAttribute); 175 | 176 | if (targetMethod != null) 177 | { 178 | ParameterInfo[] methodParams = targetMethod.GetParameters(); 179 | List parameterValues = new List(); 180 | 181 | //Check if the amount of parameters is as expected 182 | if (methodParams.Length == parameters.Length - 1) 183 | { 184 | //Convert all parameters to prepare for the invocation of the target method 185 | for (int i = 0; i < methodParams.Length; i++) 186 | { 187 | try 188 | { 189 | var parameterType = methodParams[i].ParameterType; 190 | var parameterValue = parameters[i + 1]; 191 | object converted = null; 192 | 193 | //Custom conversion 194 | if (TypeParser.HasConversionFor(parameterType)) 195 | { 196 | converted = TypeParser.Convert(parameterType, parameterValue.Split(',')); 197 | } 198 | //Try to convert the string to the target type 199 | else 200 | { 201 | converted = Convert.ChangeType(parameterValue, parameterType); 202 | } 203 | 204 | parameterValues.Add(converted); 205 | } 206 | catch 207 | { 208 | throw new Exception("Parameter conversion error."); 209 | } 210 | } 211 | 212 | object target; 213 | if (TryFindExecutableInstanceOfType(targetMethod.DeclaringType, out target)) 214 | { 215 | targetMethod.Invoke(target, parameterValues.ToArray()); 216 | } 217 | else 218 | { 219 | throw new Exception("No executable instance found in the scene."); 220 | } 221 | return; 222 | } 223 | else 224 | { 225 | _consoleWriter.WriteError((parameters.Length - 1).ToString() + " parameters given but " + methodParams.Length + " expected."); 226 | _consoleWriter.WriteError("Usage: " + GetUsageInformation(command, targetMethod)); 227 | throw new Exception(string.Empty); 228 | } 229 | } 230 | else 231 | { 232 | throw new Exception("Command " + command + " not found."); 233 | } 234 | } 235 | 236 | private MethodInfo MethodByCmdName(string cmd) 237 | { 238 | return CommandMethods.Where(cm => GetAttribute(cm).Command == cmd).FirstOrDefault(); 239 | } 240 | 241 | private MethodInfo[] CommandMethods 242 | { 243 | get 244 | { 245 | var types = FindExecutableTypes(); 246 | types = types.Where(t => FindObjectOfType(t) != null).ToList(); 247 | 248 | var methods = types.SelectMany(t => t.GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)).ToList(); 249 | MethodInfo[] filtered = methods.Where(m => m.GetCustomAttributes(typeof(ConsoleMethod), false).Length > 0).ToArray(); 250 | return filtered; 251 | } 252 | } 253 | 254 | private ConsoleMethod GetAttribute(MethodInfo minfo) 255 | { 256 | ConsoleMethod[] attributes = minfo.GetCustomAttributes(typeof(ConsoleMethod), false) as ConsoleMethod[]; 257 | if (attributes != null && attributes.Length > 0) 258 | { 259 | return attributes[0]; 260 | } 261 | return null; 262 | } 263 | 264 | private string GetCommandName(MethodInfo minfo) 265 | { 266 | ConsoleMethod attribute = GetAttribute(minfo); 267 | return attribute != null ? attribute.Command : string.Empty; 268 | } 269 | 270 | private string GetCommandDescr(MethodInfo minfo) 271 | { 272 | ConsoleMethod attribute = GetAttribute(minfo); 273 | return attribute != null ? attribute.Description : string.Empty; 274 | } 275 | 276 | private string GetUsageInformation(string cmdName, MethodInfo minfo) 277 | { 278 | var description = string.Format("{0}", cmdName); ; 279 | Action AddParameterDescr = (string line) => { description += " " + line; }; 280 | var parameters = minfo.GetParameters(); 281 | 282 | foreach (ParameterInfo pinfo in parameters) 283 | { 284 | var parameterAttribute = pinfo.GetCustomAttributes(typeof(ConsoleParameter), false).FirstOrDefault() as ConsoleParameter; 285 | 286 | if (parameterAttribute != null) 287 | { 288 | AddParameterDescr(string.Format("[{0}]", parameterAttribute.Description)); 289 | } 290 | else 291 | { 292 | AddParameterDescr(string.Format("[{0}]", pinfo.Name)); 293 | } 294 | } 295 | return description; 296 | } 297 | 298 | #endregion 299 | 300 | #region Commands 301 | 302 | [ConsoleMethod("help", "Prints all available commands.")] 303 | private void HelpCmd() 304 | { 305 | _consoleWriter.WriteLine(""); 306 | _consoleWriter.Write("Available commands: "); 307 | MethodInfo[] methods = CommandMethods; 308 | 309 | var commands = string.Join(", ", methods.Select(m => GetCommandName(m)).ToArray()); 310 | _consoleWriter.Write(commands); 311 | } 312 | 313 | [ConsoleMethod("chelp", "Description of the given command.")] 314 | private void CHelp(string cmdName) 315 | { 316 | MethodInfo minfo = MethodByCmdName(cmdName); 317 | if (minfo != null) 318 | { 319 | _consoleWriter.WriteLine(GetCommandDescr(minfo)); 320 | _consoleWriter.WriteLine("Usage: " + GetUsageInformation(cmdName, minfo)); 321 | } 322 | else 323 | { 324 | _consoleWriter.WriteError("Invalid command " + cmdName + "."); 325 | } 326 | } 327 | 328 | [ConsoleMethod("quit", "Quits the game.")] 329 | private void QuitGame() 330 | { 331 | Application.Quit(); 332 | } 333 | 334 | [ConsoleMethod("close", "Closes the developers console.")] 335 | private void CloseConsole() 336 | { 337 | _consoleIO.IsVisible = false; 338 | } 339 | 340 | [ConsoleMethod("clear", "Clears the console window from text.")] 341 | private void ClearConsole() 342 | { 343 | _consoleIO.ClearOutput(); 344 | } 345 | 346 | #endregion 347 | } 348 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/ConsoleLogic.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbb6f88eed0554c4baaca8a704f818d0 3 | timeCreated: 1507131345 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/Scripts/Console/Converters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ac7c07cd3a1ecf4cb701a51027d30c2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/BaseConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | namespace IngameConsole 7 | { 8 | public abstract class BaseConverter : IConverter 9 | { 10 | public T AttemptConversion(params string[] rawParameters) 11 | { 12 | var writer = new FormattedWriter(); 13 | 14 | var methods = GetType().MethodsWithAttribute() 15 | .Where(m => m.GetParameters().Count() == rawParameters.Length); 16 | 17 | var targetMethod = methods.FirstOrDefault(); 18 | 19 | if (targetMethod == null) 20 | { 21 | throw new Exception(string.Format("No conversion found for type \'{0}\' that takes {1} parameters.", typeof(T).Name, rawParameters.Count())); 22 | } 23 | 24 | var methodCount = methods.Count(); 25 | if (methodCount > 1) 26 | { 27 | writer.WriteWarning(string.Format("Found {0} methods with {1} parameters. First one was chosen by default.", methodCount, rawParameters.Count())); 28 | } 29 | 30 | var parameterTypes = targetMethod.GetParameterTypes().ToList(); 31 | IList convertedParameters; 32 | 33 | if (!TryConvertParameters(rawParameters, parameterTypes, out convertedParameters)) 34 | { 35 | throw new Exception("Conversion error."); 36 | } 37 | 38 | return (T)targetMethod.Invoke(this, convertedParameters.ToArray()); 39 | } 40 | 41 | object IConverter.AttemptConversion(params string[] rawParameters) 42 | { 43 | return AttemptConversion(rawParameters); 44 | } 45 | 46 | private bool TryConvertParameters(IList parameters, IList targetTypes, out IList convertedParameters) 47 | { 48 | convertedParameters = new List(); 49 | 50 | if (parameters.Count() != targetTypes.Count()) return false; 51 | 52 | for (int i = 0; i < parameters.Count(); i++) 53 | { 54 | try 55 | { 56 | var convertedParameter = Convert.ChangeType(parameters[i], targetTypes[i]); 57 | convertedParameters.Add(convertedParameter); 58 | } 59 | catch 60 | { 61 | return false; 62 | } 63 | } 64 | return true; 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/BaseConverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a1ff0d01de5ec14dae708ac578628a5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/ColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using UnityEngine; 5 | using System.Linq; 6 | using System; 7 | 8 | namespace IngameConsole 9 | { 10 | public class ColorConverter : BaseConverter 11 | { 12 | [ConversionMethod] 13 | //RGB with alpha 14 | public Color Convert(float r, float g, float b, float a) 15 | { 16 | return new Color(r / 255f, g / 255f, b / 255f, a / 255f); 17 | } 18 | 19 | [ConversionMethod] 20 | //RGB without alpha 21 | public Color Convert(float r, float g, float b) 22 | { 23 | return new Color(r / 255f, g / 255f, b / 255f); 24 | } 25 | 26 | [ConversionMethod] 27 | public Color Convert(string color) 28 | { 29 | Color parsedColor; 30 | 31 | if (color.StartsWith("#")) 32 | { 33 | ColorUtility.TryParseHtmlString(color, out parsedColor); 34 | } 35 | else 36 | { 37 | var mapping = typeof(Color).GetStaticPropertiesOfType(); 38 | 39 | if (mapping.ContainsKey(color.ToLower())) 40 | { 41 | parsedColor = mapping[color.ToLower()]; 42 | } 43 | else 44 | { 45 | throw new Exception(string.Format("Unknown color {0}.", color)); 46 | } 47 | } 48 | 49 | return parsedColor; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/ColorConverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db87721bf70b7124ea5be0a6098f46f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/GameObjectConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace IngameConsole 5 | { 6 | public class GameObjectConverter : BaseConverter 7 | { 8 | [ConversionMethod] 9 | public GameObject Convert(string name) 10 | { 11 | var converted = GameObject.Find(name); 12 | 13 | if (converted == null) 14 | { 15 | throw new Exception(string.Format("GameObject with name {0} not found.", name)); 16 | } 17 | 18 | return converted; 19 | } 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/GameObjectConverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f26755b813182b4da905aa070b5a232 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/IConverter.cs: -------------------------------------------------------------------------------- 1 | namespace IngameConsole 2 | { 3 | public interface IConverter 4 | { 5 | object AttemptConversion(params string[] rawParameters); 6 | } 7 | public interface IConverter : IConverter 8 | { 9 | new T AttemptConversion(params string[] rawParameters); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/IConverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 783778f76a8bc1b4187d1da6936bbfdb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/TypeParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Linq; 5 | 6 | namespace IngameConsole 7 | { 8 | public static class TypeParser 9 | { 10 | private static readonly Dictionary _converters = new Dictionary(); 11 | 12 | static TypeParser() 13 | { 14 | var assembly = Assembly.GetAssembly(typeof(BaseConverter<>)); 15 | var types = assembly.GetTypes(); 16 | 17 | types.Where(t => t.BaseType != null && t.BaseType.IsGenericType && t.BaseType.GetGenericTypeDefinition() == typeof(BaseConverter<>)) 18 | .ToList() 19 | .ForEach(t => _converters.Add(t.BaseType.GetGenericArguments()[0], (IConverter)Activator.CreateInstance(t))); 20 | } 21 | 22 | public static bool HasConversionFor(Type type) 23 | { 24 | return _converters.ContainsKey(type); 25 | } 26 | 27 | public static bool HasConversionFor() 28 | { 29 | return HasConversionFor(typeof(T)); 30 | } 31 | 32 | public static object Convert(Type type, params string[] parameters) 33 | { 34 | if (!HasConversionFor(type)) return null; 35 | return _converters[type].AttemptConversion(parameters); 36 | } 37 | 38 | public static object Convert(params string[] parameters) 39 | { 40 | return Convert(typeof(T), parameters); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/TypeParser.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a3ec46b142a05341b6831860a8e0fac 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/Vector2Converter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace IngameConsole 4 | { 5 | public class Vector2Converter : BaseConverter 6 | { 7 | [ConversionMethod] 8 | public Vector2 Convert(float x, float y) 9 | { 10 | return new Vector2(x, y); 11 | } 12 | 13 | [ConversionMethod] 14 | public Vector2 Convert(float x) 15 | { 16 | return Vector2.one * x; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/Vector2Converter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b749dd69206b5024d854dbb5a6669daf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/Vector3Converter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace IngameConsole 4 | { 5 | public class Vector3Converter : BaseConverter 6 | { 7 | [ConversionMethod] 8 | public Vector3 Convert(float x, float y, float z) 9 | { 10 | return new Vector3(x, y, z); 11 | } 12 | 13 | [ConversionMethod] 14 | public Vector3 Convert(float x, float y) 15 | { 16 | return new Vector3(x, y); 17 | } 18 | 19 | [ConversionMethod] 20 | public Vector3 Convert(float x) 21 | { 22 | return Vector3.one * x; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Converters/Vector3Converter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1b9bc7e54e7e634fbb8379dfdd3ade3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Customization.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bf48d37a8e5edb4c8ffa9465fb73620 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Customization/OutputColors.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace IngameConsole 4 | { 5 | public class OutputColors 6 | { 7 | public OutputColors() 8 | { 9 | } 10 | 11 | public OutputColors(Color error, Color info, Color warning) 12 | { 13 | Error = error; 14 | Info = info; 15 | Warning = warning; 16 | } 17 | 18 | public static OutputColors Default { get; } = new OutputColors() 19 | { 20 | Error = Color.red, 21 | Info = new Color32(30, 98, 206, 255), 22 | Warning = new Color32(170, 135, 30, 255) 23 | }; 24 | 25 | public Color Error { get; set; } 26 | 27 | public Color Info { get; set; } 28 | 29 | public Color Warning { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Customization/OutputColors.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe3fc482c6385b349bc5d641f418cec7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 619c16c08b7096b499d44a6611013938 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/ConsoleHistory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace IngameConsole 4 | { 5 | public class ConsoleHistory 6 | { 7 | private List _history = new List(); 8 | private int _offset = 0; 9 | private int _maxCapacity = 10; 10 | 11 | public ConsoleHistory() 12 | { 13 | 14 | } 15 | 16 | public ConsoleHistory(int maxCapacity) 17 | { 18 | _maxCapacity = maxCapacity; 19 | } 20 | 21 | public void WriteToHistory(string command) 22 | { 23 | if(CommandAt(_history.Count - 1) != command) 24 | { 25 | _history.Add(command); 26 | 27 | if (_history.Count > _maxCapacity) 28 | { 29 | _history.RemoveAt(0); 30 | } 31 | } 32 | 33 | ResetOffset(); 34 | } 35 | 36 | public string ShiftBack() 37 | { 38 | var command = CurrentCommand; 39 | 40 | _offset++; 41 | CheckOffset(); 42 | 43 | return command; 44 | } 45 | 46 | public string ShiftForward() 47 | { 48 | var command = CurrentCommand; 49 | 50 | _offset--; 51 | CheckOffset(); 52 | 53 | return command; 54 | } 55 | 56 | public void ResetOffset() 57 | { 58 | _offset = 0; 59 | } 60 | 61 | public void Clear() 62 | { 63 | _history.Clear(); 64 | } 65 | 66 | private string CurrentCommand 67 | { 68 | get 69 | { 70 | return CommandAt(CurrentIndex); 71 | } 72 | } 73 | 74 | private string CommandAt(int index) 75 | { 76 | var command = string.Empty; 77 | 78 | try 79 | { 80 | command = _history[index]; 81 | } 82 | catch { } 83 | 84 | return command; 85 | } 86 | 87 | private int CurrentIndex 88 | { 89 | get { return _history.Count - 1 - _offset; } 90 | } 91 | 92 | private void CheckOffset() 93 | { 94 | if (_offset > _history.Count - 1) 95 | { 96 | _offset = 0; 97 | } 98 | 99 | if (_offset < 0) 100 | { 101 | _offset = _history.Count - 1; 102 | } 103 | } 104 | } 105 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/ConsoleHistory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81edf778b2d57d743aa238c7f60c5862 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Linq; 5 | 6 | namespace IngameConsole 7 | { 8 | public static class ExtensionMethods 9 | { 10 | public static IEnumerable MethodsWithAttribute(this Type type) 11 | { 12 | return type.GetMethods().Where(m => m.GetCustomAttributes(typeof(ConversionMethod), false).Any()).ToList(); 13 | } 14 | 15 | public static IEnumerable GetParameterTypes(this MethodInfo minfo) 16 | { 17 | return minfo.GetParameters().Select(p => p.ParameterType).ToList(); 18 | } 19 | 20 | public static IDictionary GetStaticPropertiesOfType(this Type type) 21 | { 22 | return typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Static) 23 | .Where(t => t.PropertyType == typeof(T)) 24 | .ToDictionary(p => p.Name.ToLower(), p => (T)p.GetValue(null, null)); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/ExtensionMethods.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9fa8a67a6ef2964b95a813f672ef035 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/InputReceivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameConsole 4 | { 5 | public class InputReceivedEventArgs : EventArgs 6 | { 7 | private readonly string _input; 8 | 9 | public InputReceivedEventArgs(string input) 10 | { 11 | _input = input; 12 | } 13 | 14 | public string Input 15 | { 16 | get { return _input; } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Helpers/InputReceivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8f0506351a1d57469f9c35689056983 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7ee861fd3effa243b034a25dd27e61a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/BaseConsoleIO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace IngameConsole 5 | { 6 | public abstract class BaseConsoleIO : MonoBehaviour 7 | { 8 | public delegate void InputReceivedEventHandler(object sender, InputReceivedEventArgs e); 9 | 10 | public event InputReceivedEventHandler InputReceived; 11 | 12 | /// 13 | /// Helper class to format input text 14 | /// Needs to be initialized in the Awake method 15 | /// 16 | public abstract BaseWriter Writer { get; } 17 | 18 | /// 19 | /// Informs the ConsoleLogic about input changes 20 | /// 21 | protected void RaiseInputReceived() 22 | { 23 | InputReceived(this, new InputReceivedEventArgs(Input)); 24 | } 25 | 26 | /// 27 | /// The current input text. 28 | /// Readonly. 29 | /// 30 | public abstract string Input { get; set; } 31 | 32 | /// 33 | /// Adds the given text to the output window. 34 | /// Use ConsoleIO instead if you want to write to the console. 35 | /// 36 | 37 | public abstract void AppendToOutput(string text); 38 | 39 | /// 40 | /// Clears current text from input field. 41 | /// 42 | public virtual void ClearInput() { } 43 | 44 | /// 45 | /// Clears all output lines from the console window. 46 | /// 47 | public virtual void ClearOutput() { } 48 | 49 | /// 50 | /// Sets selection to input field. 51 | /// 52 | public virtual void SelectInput() { } 53 | 54 | /// 55 | /// Returns the visible state of the console. 56 | /// Can be used to show or hide the console. 57 | /// If your implementation does not depend on any UI, 58 | /// true should be returned by default 59 | /// 60 | public virtual bool IsVisible { get { return true; } set { } } 61 | 62 | /// 63 | /// Sets console to visible if invisible and vice versa. 64 | /// 65 | public virtual void ToggleVisibility() { } 66 | } 67 | 68 | public abstract class BaseConsoleIO : BaseConsoleIO where T : BaseWriter 69 | { 70 | private T _writer; 71 | 72 | protected virtual void Awake() 73 | { 74 | _writer = CreateWriter(); 75 | } 76 | 77 | protected virtual T CreateWriter() 78 | { 79 | return (T)Activator.CreateInstance(typeof(T), new object[] { this }); 80 | } 81 | 82 | public override BaseWriter Writer 83 | { 84 | get 85 | { 86 | return _writer; 87 | } 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/BaseConsoleIO.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11a56cc02c69c3d429d18a3ed6b5816f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/ConsoleIO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | using UnityInput = UnityEngine.Input; 5 | 6 | namespace IngameConsole 7 | { 8 | [RequireComponent(typeof(Animator))] 9 | public class ConsoleIO : BaseConsoleIO 10 | { 11 | [SerializeField] 12 | private InputField _input; 13 | [SerializeField] 14 | private Text _outputText; 15 | [SerializeField] 16 | private KeyCode _consoleToggleKey = KeyCode.Tab; 17 | [SerializeField] 18 | private int _inputHistoryCapacity = 10; 19 | 20 | [Header("Colors")] 21 | [SerializeField] 22 | private Color _errorColor; 23 | [SerializeField] 24 | private Color _infoColor; 25 | [SerializeField] 26 | private Color _warningColor; 27 | 28 | private ConsoleHistory _history; 29 | private Animator _animator; 30 | private bool _isVisible = false; 31 | 32 | public event EventHandler VisibilityChanged; 33 | 34 | protected override void Awake() 35 | { 36 | base.Awake(); 37 | _history = new ConsoleHistory(maxCapacity: _inputHistoryCapacity); 38 | _animator = GetComponent(); 39 | } 40 | 41 | private void Update() 42 | { 43 | //Open or close console 44 | if (UnityInput.GetKeyDown(_consoleToggleKey)) 45 | { 46 | ToggleVisibility(); 47 | } 48 | 49 | if (IsVisible) 50 | { 51 | //Command has been entered 52 | if (UnityInput.GetKeyDown(KeyCode.Return)) 53 | { 54 | _history.WriteToHistory(Input); 55 | RaiseInputReceived(); 56 | } 57 | 58 | HandleHistory(); 59 | } 60 | } 61 | 62 | public override string Input 63 | { 64 | get { return _input.text; } 65 | set { _input.text = value; _input.caretPosition = _input.text.Length; } 66 | } 67 | 68 | public override bool IsVisible 69 | { 70 | get { return _isVisible; } 71 | set 72 | { 73 | if (_isVisible != value) 74 | { 75 | _isVisible = value; 76 | ApplyConsoleState(); 77 | 78 | if (VisibilityChanged != null) 79 | { 80 | VisibilityChanged.Invoke(this, new VisibilityChangedArgs(_isVisible)); 81 | } 82 | } 83 | } 84 | } 85 | 86 | public override void ToggleVisibility() 87 | { 88 | IsVisible = !IsVisible; 89 | } 90 | 91 | public override void ClearInput() 92 | { 93 | _input.text = string.Empty; 94 | } 95 | 96 | public override void ClearOutput() 97 | { 98 | _outputText.text = string.Empty; 99 | } 100 | 101 | public override void SelectInput() 102 | { 103 | _input.Select(); 104 | _input.ActivateInputField(); 105 | } 106 | 107 | public override void AppendToOutput(string text) 108 | { 109 | _outputText.text += text; 110 | } 111 | 112 | public KeyCode ToggleKey 113 | { 114 | get { return _consoleToggleKey; } 115 | } 116 | 117 | protected override ConsoleWriter CreateWriter() 118 | { 119 | var colors = new OutputColors(_errorColor, _infoColor, _warningColor); 120 | return new ConsoleWriter(this, colors); 121 | } 122 | 123 | private void ApplyConsoleState() 124 | { 125 | _animator.SetBool("Show", _isVisible); 126 | 127 | if (_isVisible) 128 | { 129 | ClearInput(); 130 | SelectInput(); 131 | } 132 | } 133 | 134 | private void HandleHistory() 135 | { 136 | var historyRequested = false; 137 | var command = string.Empty; 138 | 139 | if (UnityInput.GetKeyDown(KeyCode.UpArrow)) 140 | { 141 | command = _history.ShiftBack(); 142 | historyRequested = true; 143 | } 144 | 145 | if (UnityInput.GetKeyDown(KeyCode.DownArrow)) 146 | { 147 | command = _history.ShiftForward(); 148 | historyRequested = true; 149 | } 150 | 151 | if (historyRequested && command != string.Empty) 152 | { 153 | Input = command; 154 | } 155 | } 156 | } 157 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/ConsoleIO.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9903e662d006226449d2236047e02216 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/NetworkIO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Net; 6 | using System.Net.Sockets; 7 | using System.Threading; 8 | using UnityEngine; 9 | 10 | namespace IngameConsole 11 | { 12 | [RequireComponent(typeof(ConsoleLogic))] 13 | public class NetworkIO : BaseConsoleIO 14 | { 15 | public string ip = "127.0.0.1"; 16 | public int port = 6001; 17 | public bool logDebugInfo = false; 18 | 19 | private string _input = string.Empty; 20 | private string _output = string.Empty; 21 | private Queue _queuedCommands = new Queue(); 22 | private string welcomeMessage; 23 | private TcpClient _client; 24 | private TcpListener _listener; 25 | private bool _applicationExited = false; 26 | 27 | private void Start() 28 | { 29 | var serverThread = new Thread(new ThreadStart(StartServer)); 30 | serverThread.IsBackground = true; 31 | serverThread.Start(); 32 | welcomeMessage = _output; 33 | _output = string.Empty; 34 | } 35 | 36 | private void Update() 37 | { 38 | if (HasQueuedCommands) 39 | { 40 | var executionLock = new object(); 41 | lock (executionLock) 42 | { 43 | _input = _queuedCommands.Dequeue(); 44 | RaiseInputReceived(); 45 | } 46 | } 47 | } 48 | 49 | public override string Input 50 | { 51 | get { return _input; } 52 | set { _input = value; } 53 | } 54 | 55 | public override void AppendToOutput(string text) 56 | { 57 | lock (_output) 58 | { 59 | _output += text; 60 | } 61 | } 62 | 63 | private void WriteOutputToClient(StreamWriter writer) 64 | { 65 | var splitStrings = _output.Split(new char[] { '\n' }); 66 | 67 | foreach (string s in splitStrings) 68 | { 69 | //Don't write empty line or the command 70 | if (s == string.Empty || s.StartsWith("> ")) continue; 71 | 72 | ConditionalLog("-> " + s); 73 | writer.WriteLine(s); 74 | writer.Flush(); 75 | } 76 | 77 | writer.Write('\0'); 78 | writer.Flush(); 79 | 80 | lock (_output) 81 | { 82 | _output = string.Empty; 83 | } 84 | } 85 | 86 | private bool HasQueuedCommands 87 | { 88 | get 89 | { 90 | lock (_queuedCommands) 91 | { 92 | return _queuedCommands.Count > 0; 93 | } 94 | } 95 | } 96 | 97 | private void StartServer() 98 | { 99 | TcpListener listener = null; 100 | 101 | try 102 | { 103 | HandleClients(out listener); 104 | } 105 | catch (Exception e) 106 | { 107 | ConditionalLog(e.Message); 108 | } 109 | finally 110 | { 111 | if (listener != null) 112 | { 113 | listener.Stop(); 114 | ConditionalLog("Server stopped."); 115 | } 116 | } 117 | ConditionalLog("Thread closed."); 118 | } 119 | 120 | private void HandleClients(out TcpListener listener) 121 | { 122 | var localAddress = IPAddress.Parse(ip); 123 | listener = new TcpListener(localAddress, port); 124 | 125 | listener.Start(); 126 | ConditionalLog("Server started."); 127 | 128 | AppendToOutput(welcomeMessage); 129 | 130 | while (!_applicationExited) 131 | { 132 | ConditionalLog("Listening for incoming connections..."); 133 | using (_client = listener.AcceptTcpClient()) 134 | { 135 | ConditionalLog("Client connection established."); 136 | using (var writer = new StreamWriter(_client.GetStream())) 137 | using (var reader = new StreamReader(_client.GetStream())) 138 | { 139 | //Write existing output to client 140 | WriteOutputToClient(writer); 141 | 142 | var clientMessage = string.Empty; 143 | 144 | while (IsClientConnected(reader) && (clientMessage = reader.ReadLine()) != null && clientMessage != "exit") 145 | { 146 | ConditionalLog("<-" + clientMessage); 147 | 148 | EnqueueCommand(clientMessage); 149 | WaitForExecution(); 150 | 151 | WriteOutputToClient(writer); 152 | } 153 | 154 | ConditionalLog("Client connection has been lost."); 155 | } 156 | } 157 | } 158 | } 159 | 160 | void OnApplicationQuit() 161 | { 162 | _applicationExited = true; 163 | 164 | ConditionalLog("Application quits..."); 165 | 166 | try 167 | { 168 | lock (_client) 169 | { 170 | _client.Close(); 171 | } 172 | ConditionalLog("Force closed client."); 173 | } 174 | catch { } 175 | 176 | try 177 | { 178 | lock(_listener) 179 | { 180 | _listener.Stop(); 181 | } 182 | ConditionalLog("Forced server to close."); 183 | } 184 | catch { } 185 | } 186 | 187 | private void EnqueueCommand(string command) 188 | { 189 | lock (_queuedCommands) 190 | { 191 | _queuedCommands.Enqueue(command); 192 | } 193 | } 194 | 195 | private void WaitForExecution() 196 | { 197 | while (HasQueuedCommands) { Thread.Sleep(50); } 198 | } 199 | 200 | private void ConditionalLog(string text) 201 | { 202 | if (logDebugInfo) 203 | { 204 | Debug.Log(text); 205 | } 206 | } 207 | 208 | private bool IsClientConnected(StreamReader reader) 209 | { 210 | try 211 | { 212 | reader.Peek(); 213 | return true; 214 | } 215 | catch 216 | { 217 | return false; 218 | } 219 | } 220 | } 221 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/IO/NetworkIO.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efa778a40cf0b404bafeb2c3abcbdee9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95cab2473461eba46914b250949bc2a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/BaseWriter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace IngameConsole 4 | { 5 | public abstract class BaseWriter 6 | { 7 | protected readonly BaseConsoleIO _consoleIO; 8 | 9 | public BaseWriter() { } 10 | 11 | public BaseWriter(BaseConsoleIO consoleIO) 12 | { 13 | _consoleIO = consoleIO; 14 | } 15 | 16 | public virtual void WriteLine(string text) { } 17 | 18 | public virtual void Write(string text) { } 19 | 20 | public virtual void WriteLineItalic(string text) { } 21 | 22 | public virtual void WriteItalic(string text) { } 23 | 24 | public virtual void WriteLineBold(string text) { } 25 | 26 | public virtual void WriteBold(string text) { } 27 | 28 | public virtual void WriteError(string text) { } 29 | 30 | public virtual void WriteInfo(string text) { } 31 | 32 | public virtual void WriteWarning(string text) { } 33 | 34 | public virtual void OpenBold() { } 35 | 36 | public virtual void CloseBold() { } 37 | 38 | public virtual void OpenColor(Color color) { } 39 | 40 | public virtual void CloseColor() { } 41 | 42 | public virtual void NextLine() { } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/BaseWriter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd05f721daa64bd4f81f01c93e71aeb5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/ConsoleWriter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace IngameConsole 4 | { 5 | public class ConsoleWriter : BaseWriter 6 | { 7 | private Color _errorColor; 8 | private Color _infoColor; 9 | private Color _warningColor; 10 | 11 | public ConsoleWriter(BaseConsoleIO consoleIO) : this(consoleIO, OutputColors.Default) { } 12 | 13 | public ConsoleWriter(BaseConsoleIO consoleIO, OutputColors colors) 14 | : base(consoleIO) 15 | { 16 | _errorColor = colors.Error; 17 | _infoColor = colors.Info; 18 | _warningColor = colors.Warning; 19 | } 20 | 21 | public override void WriteLine(string text) 22 | { 23 | Write("\n" + text); 24 | } 25 | 26 | public override void Write(string text) 27 | { 28 | _consoleIO.AppendToOutput(text); 29 | } 30 | 31 | public override void WriteLineItalic(string text) 32 | { 33 | WriteLine(string.Format("{0}", text)); 34 | } 35 | 36 | public override void WriteItalic(string text) 37 | { 38 | Write(string.Format("{0}", text)); 39 | } 40 | 41 | public override void WriteLineBold(string text) 42 | { 43 | WriteLine(string.Format("{0}", text)); 44 | } 45 | 46 | public override void WriteBold(string text) 47 | { 48 | Write(string.Format("{0}", text)); 49 | } 50 | 51 | public override void WriteError(string text) 52 | { 53 | OpenColor(_errorColor); 54 | WriteLine(text); 55 | CloseColor(); 56 | } 57 | 58 | public override void WriteInfo(string text) 59 | { 60 | OpenColor(_infoColor); 61 | WriteLine(text); 62 | CloseColor(); 63 | } 64 | 65 | public override void WriteWarning(string text) 66 | { 67 | OpenColor(_warningColor); 68 | WriteLine(text); 69 | CloseColor(); 70 | } 71 | 72 | public override void OpenBold() 73 | { 74 | Write(""); 75 | } 76 | 77 | public override void CloseBold() 78 | { 79 | Write(""); 80 | } 81 | 82 | public override void OpenColor(Color color) 83 | { 84 | string hexCol = ColorUtility.ToHtmlStringRGB(color); 85 | Write(string.Format("", hexCol)); 86 | } 87 | 88 | public override void CloseColor() 89 | { 90 | Write(""); 91 | } 92 | 93 | public override void NextLine() 94 | { 95 | Write("\n"); 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/ConsoleWriter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c21dafff4fa07434f9e9c2f01b3797b6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/FormattedWriter.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | namespace IngameConsole 5 | { 6 | public class FormattedWriter : BaseWriter 7 | { 8 | private static BaseWriter _writer; 9 | 10 | public static void Initialize() 11 | { 12 | var ios = Object.FindObjectsOfType(); 13 | _writer = ios.Select(io => io.Writer).FirstOrDefault(); 14 | } 15 | 16 | public FormattedWriter() { } 17 | 18 | public override void WriteLine(string text) { _writer.WriteLine(text); } 19 | 20 | public override void Write(string text) { _writer.Write(text); } 21 | 22 | public override void WriteLineItalic(string text) { _writer.WriteLineItalic(text); } 23 | 24 | public override void WriteItalic(string text) { _writer.WriteItalic(text); } 25 | 26 | public override void WriteLineBold(string text) { _writer.WriteLineBold(text); } 27 | 28 | public override void WriteBold(string text) { _writer.WriteBold(text); } 29 | 30 | public override void WriteError(string text) { _writer.WriteError(text); } 31 | 32 | public override void WriteInfo(string text) { _writer.WriteInfo(text); } 33 | 34 | public override void WriteWarning(string text) { _writer.WriteWarning(text); } 35 | 36 | public override void OpenBold() { _writer.OpenBold(); } 37 | 38 | public override void CloseBold() { _writer.CloseBold(); } 39 | 40 | public override void OpenColor(Color color) { _writer.OpenColor(color); } 41 | 42 | public override void CloseColor() { _writer.CloseColor(); } 43 | 44 | public override void NextLine() { _writer.NextLine(); } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/FormattedWriter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf7ae433ba6d3ba41bafa4798e562370 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/NetworkWriter.cs: -------------------------------------------------------------------------------- 1 | namespace IngameConsole 2 | { 3 | public class NetworkWriter : BaseWriter 4 | { 5 | private const string baseIdentifier = "#>>"; 6 | private const string errorIdentifier = "x"; 7 | private const string warningIdentifier = "!"; 8 | 9 | public NetworkWriter(BaseConsoleIO consoleIO) : base(consoleIO) { } 10 | 11 | public override void CloseBold() 12 | { 13 | Write("'"); 14 | } 15 | 16 | public override void NextLine() 17 | { 18 | Write("\n"); 19 | } 20 | 21 | public override void OpenBold() 22 | { 23 | Write("'"); 24 | } 25 | 26 | public override void Write(string text) 27 | { 28 | text = text.Replace("", "'").Replace("", "'"); 29 | _consoleIO.AppendToOutput(text); 30 | } 31 | 32 | public override void WriteBold(string text) 33 | { 34 | Write(string.Format("'{0}'", text)); 35 | } 36 | 37 | public override void WriteError(string text) 38 | { 39 | WriteFormattedLine(text, errorIdentifier); 40 | } 41 | 42 | public override void WriteInfo(string text) 43 | { 44 | WriteLine(text); 45 | } 46 | 47 | public override void WriteItalic(string text) 48 | { 49 | Write(string.Format("'{0}'", text)); 50 | } 51 | 52 | public override void WriteLineBold(string text) 53 | { 54 | WriteLine(text); 55 | } 56 | 57 | public override void WriteLineItalic(string text) 58 | { 59 | WriteLine(text); 60 | } 61 | 62 | public override void WriteWarning(string text) 63 | { 64 | WriteFormattedLine(text, warningIdentifier); 65 | } 66 | 67 | public override void WriteLine(string text) 68 | { 69 | Write(text + "\n"); 70 | } 71 | 72 | private void WriteFormattedLine(string text, string type) 73 | { 74 | WriteLine(string.Format("{0}{1}{2}", baseIdentifier, type, text)); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /Assets/Scripts/Console/Writers/NetworkWriter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8243be87439b12649b50b84cddff135e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 445ce3229e7fbf44ea9c27a53367eae1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CameraShiftEffect.cs: -------------------------------------------------------------------------------- 1 | using IngameConsole; 2 | using UnityEngine; 3 | 4 | public class CameraShiftEffect : MonoBehaviour 5 | { 6 | public float _offset = 5f; 7 | 8 | private Camera _camera; 9 | private Vector3 _defaultRotation; 10 | private ConsoleIO _consoleIO; 11 | private bool _paused = false; 12 | 13 | void Start() 14 | { 15 | _camera = GetComponent(); 16 | _defaultRotation = _camera.transform.rotation.eulerAngles; 17 | _consoleIO = FindObjectOfType(); 18 | 19 | if(_consoleIO != null) 20 | { 21 | _consoleIO.VisibilityChanged += OnVisibilityChanged; 22 | } 23 | } 24 | 25 | void Update() 26 | { 27 | if(_paused) 28 | { 29 | return; 30 | } 31 | 32 | Vector2 screen = new Vector2(Screen.width, Screen.height); 33 | Vector2 mousePos = Input.mousePosition; 34 | 35 | Vector2 normalizedPosition = mousePos / screen; 36 | 37 | var _cameraOffset = new Vector3( 38 | _offset * 0.5f - _offset * normalizedPosition.y, 39 | -_offset * 0.5f + _offset * normalizedPosition.x, 40 | 0f); 41 | 42 | var rotation = _camera.transform.rotation; 43 | _camera.transform.rotation = Quaternion.Euler(_defaultRotation + _cameraOffset); 44 | } 45 | 46 | private void OnDestroy() 47 | { 48 | if (_consoleIO != null) 49 | { 50 | _consoleIO.VisibilityChanged -= OnVisibilityChanged; 51 | } 52 | } 53 | 54 | private void OnVisibilityChanged(object sender, VisibilityChangedArgs args) 55 | { 56 | _paused = args.Visibility; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CameraShiftEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5c643bf41877ae4ba3d75b6aff1e57e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/GameControllerCommands.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using IngameConsole; 3 | using System.Linq; 4 | using UnityEngine.SceneManagement; 5 | 6 | [ExecutableFromConsole] 7 | public class GameControllerCommands : MonoBehaviour 8 | { 9 | public GameObject cube; 10 | private BaseWriter _writer = new FormattedWriter(); 11 | 12 | [ConsoleMethod("cube_rotate", "Rotates the cube by to the given angle.")] 13 | public void RotateCubeBy(float degrees) 14 | { 15 | if (CheckForCube()) 16 | { 17 | cube.transform.Rotate(Vector3.up, degrees, Space.World); 18 | } 19 | } 20 | 21 | [ConsoleMethod("cube_rotation", "Prints the current rotation of the cube.")] 22 | public void GetRotation() 23 | { 24 | if (CheckForCube()) 25 | { 26 | _writer.NextLine(); 27 | _writer.Write("Current rotation is: "); 28 | _writer.WriteBold(cube.transform.rotation.eulerAngles.ToString()); 29 | } 30 | } 31 | 32 | [ConsoleMethod("cube_scaling", "Prints the current scale of the cube.")] 33 | public void GetScale() 34 | { 35 | if (CheckForCube()) 36 | { 37 | _writer.NextLine(); 38 | _writer.Write("Current scale is: "); 39 | _writer.WriteBold(cube.transform.localScale.ToString()); 40 | } 41 | } 42 | 43 | [ConsoleMethod("cube_scale", "Scales the cube by the given factor.")] 44 | public void ScaleCubeBy([ConsoleParameter("Factor. 1 is default")] float factor) 45 | { 46 | if (CheckForCube()) 47 | { 48 | cube.transform.localScale = Vector3.one * factor; 49 | } 50 | } 51 | 52 | [ConsoleMethod("cube_random_color", "Randomizes the color of the cube.")] 53 | public void RandomizeCubeColor() 54 | { 55 | if (CheckForCube()) 56 | { 57 | SetObjectColor(cube, new Color(Random.value, Random.value, Random.value)); 58 | } 59 | } 60 | 61 | [ConsoleMethod("destroy", "Destroys the object with the given name.")] 62 | public void DestroyObject([ConsoleParameter("Name of object.")] GameObject gameObject) 63 | { 64 | Destroy(gameObject); 65 | } 66 | 67 | [ConsoleMethod("print", "Will print a message to the output.")] 68 | public void Print(string text) 69 | { 70 | _writer.WriteInfo(text); 71 | } 72 | 73 | [ConsoleMethod("scene_objects", "Lists all objects in the scene.")] 74 | public void PrintSceneObjects() 75 | { 76 | var scene = SceneManager.GetActiveScene(); 77 | var objects = scene.GetRootGameObjects(); 78 | 79 | objects.ToList().ForEach(o => _writer.WriteLine(o.name)); 80 | } 81 | 82 | [ConsoleMethod("scene_name", "Outputs the active scenes name.")] 83 | public void PrintSceneName() 84 | { 85 | var scene = SceneManager.GetActiveScene(); 86 | _writer.WriteLine(scene.name); 87 | } 88 | 89 | [ConsoleMethod("scale", "Scales the target object by the given factor.")] 90 | public void ScaleObjectBy(GameObject gameObject, [ConsoleParameter("Factor. 1 is default")] float factor) 91 | { 92 | gameObject.transform.localScale = Vector3.one * factor; 93 | } 94 | 95 | [ConsoleMethod("cube_move", "Translates the position of the cube by the given vector3.")] 96 | public void MoveCubeBy(Vector3 movement) 97 | { 98 | cube.transform.Translate(movement); 99 | } 100 | 101 | [ConsoleMethod("set_color", "Sets the color of the given object.")] 102 | public void SetObjectColor(GameObject gameObject, Color color) 103 | { 104 | var objectRenderer = gameObject.GetComponent(); 105 | var mat = objectRenderer.material; 106 | mat.SetColor("_Color", color); 107 | } 108 | 109 | private bool CheckForCube() 110 | { 111 | if (cube == null) 112 | { 113 | _writer.WriteWarning("Cube not found."); 114 | return false; 115 | } 116 | return true; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/GameControllerCommands.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cecdea9c61371a84fa185486a3b04d19 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd168c664cffb2342a61c90bd83b0f8e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures/LightTileTex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Assets/Textures/LightTileTex.png -------------------------------------------------------------------------------- /Assets/Textures/LightTileTex.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26e38758943309a4d89ebcdf69072a91 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | spriteSheet: 95 | serializedVersion: 2 96 | sprites: [] 97 | outline: [] 98 | physicsShape: [] 99 | bones: [] 100 | spriteID: 101 | vertices: [] 102 | indices: 103 | edges: [] 104 | weights: [] 105 | spritePackingTag: 106 | userData: 107 | assetBundleName: 108 | assetBundleVariant: 109 | -------------------------------------------------------------------------------- /Assets/Textures/TileTex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Assets/Textures/TileTex.png -------------------------------------------------------------------------------- /Assets/Textures/TileTex.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02dba095125c86f49a68c21f9b881627 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | spriteSheet: 95 | serializedVersion: 2 96 | sprites: [] 97 | outline: [] 98 | physicsShape: [] 99 | bones: [] 100 | spriteID: 101 | vertices: [] 102 | indices: 103 | edges: [] 104 | weights: [] 105 | spritePackingTag: 106 | userData: 107 | assetBundleName: 108 | assetBundleVariant: 109 | -------------------------------------------------------------------------------- /Documentation/ambiguity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/ambiguity.png -------------------------------------------------------------------------------- /Documentation/chelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/chelp.png -------------------------------------------------------------------------------- /Documentation/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/console.png -------------------------------------------------------------------------------- /Documentation/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/diagram.png -------------------------------------------------------------------------------- /Documentation/screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/screenshot.gif -------------------------------------------------------------------------------- /Documentation/screenshot.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/screenshot.psd -------------------------------------------------------------------------------- /Documentation/strings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/Documentation/strings.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Malte Weiß 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 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.ads": "2.0.8", 6 | "com.unity.analytics": "3.3.2", 7 | "com.unity.collab-proxy": "1.2.16", 8 | "com.unity.ext.nunit": "1.0.0", 9 | "com.unity.ide.rider": "1.1.0", 10 | "com.unity.ide.vscode": "1.1.0", 11 | "com.unity.multiplayer-hlapi": "1.0.2", 12 | "com.unity.package-manager-ui": "2.2.0", 13 | "com.unity.probuilder": "4.0.4", 14 | "com.unity.progrids": "3.0.3-preview.0", 15 | "com.unity.purchasing": "2.0.6", 16 | "com.unity.test-framework": "1.0.13", 17 | "com.unity.textmeshpro": "2.0.1", 18 | "com.unity.timeline": "1.1.0", 19 | "com.unity.ugui": "1.0.0", 20 | "com.unity.xr.legacyinputhelpers": "2.0.2", 21 | "com.unity.modules.ai": "1.0.0", 22 | "com.unity.modules.androidjni": "1.0.0", 23 | "com.unity.modules.animation": "1.0.0", 24 | "com.unity.modules.assetbundle": "1.0.0", 25 | "com.unity.modules.audio": "1.0.0", 26 | "com.unity.modules.cloth": "1.0.0", 27 | "com.unity.modules.director": "1.0.0", 28 | "com.unity.modules.imageconversion": "1.0.0", 29 | "com.unity.modules.imgui": "1.0.0", 30 | "com.unity.modules.jsonserialize": "1.0.0", 31 | "com.unity.modules.particlesystem": "1.0.0", 32 | "com.unity.modules.physics": "1.0.0", 33 | "com.unity.modules.physics2d": "1.0.0", 34 | "com.unity.modules.screencapture": "1.0.0", 35 | "com.unity.modules.terrain": "1.0.0", 36 | "com.unity.modules.terrainphysics": "1.0.0", 37 | "com.unity.modules.tilemap": "1.0.0", 38 | "com.unity.modules.ui": "1.0.0", 39 | "com.unity.modules.uielements": "1.0.0", 40 | "com.unity.modules.umbra": "1.0.0", 41 | "com.unity.modules.unityanalytics": "1.0.0", 42 | "com.unity.modules.unitywebrequest": "1.0.0", 43 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 44 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 45 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 46 | "com.unity.modules.unitywebrequestwww": "1.0.0", 47 | "com.unity.modules.vehicles": "1.0.0", 48 | "com.unity.modules.video": "1.0.0", 49 | "com.unity.modules.vr": "1.0.0", 50 | "com.unity.modules.wind": "1.0.0", 51 | "com.unity.modules.xr": "1.0.0" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /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: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /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/Scenes/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/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 | -------------------------------------------------------------------------------- /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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /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 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 18 7 | productGUID: 5474bc3b75936e84da6215bbba07fe69 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: IngameDeveloperConsole 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | displayResolutionDialog: 1 56 | iosUseCustomAppBackgroundBehavior: 0 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidUseSwappy: 0 69 | androidBlitType: 0 70 | defaultIsNativeResolution: 1 71 | macRetinaSupport: 1 72 | runInBackground: 1 73 | captureSingleScreen: 0 74 | muteOtherAudioSources: 0 75 | Prepare IOS For Recording: 0 76 | Force IOS Speakers When Recording: 0 77 | deferSystemGesturesMode: 0 78 | hideHomeButton: 0 79 | submitAnalytics: 1 80 | usePlayerLog: 1 81 | bakeCollisionMeshes: 0 82 | forceSingleInstance: 0 83 | useFlipModelSwapchain: 1 84 | resizableWindow: 0 85 | useMacAppStoreValidation: 0 86 | macAppStoreCategory: public.app-category.games 87 | gpuSkinning: 1 88 | graphicsJobs: 1 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | graphicsJobMode: 0 97 | fullscreenMode: 1 98 | xboxSpeechDB: 0 99 | xboxEnableHeadOrientation: 0 100 | xboxEnableGuest: 0 101 | xboxEnablePIXSampling: 0 102 | metalFramebufferOnly: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | vulkanEnableSetSRGBWrite: 0 117 | m_SupportedAspectRatios: 118 | 4:3: 1 119 | 5:4: 1 120 | 16:10: 1 121 | 16:9: 1 122 | Others: 1 123 | bundleVersion: 0.1 124 | preloadedAssets: [] 125 | metroInputSource: 0 126 | wsaTransparentSwapchain: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | enableVideoLayer: 0 138 | useProtectedVideoMemory: 0 139 | minimumSupportedHeadTracking: 0 140 | maximumSupportedHeadTracking: 1 141 | hololens: 142 | depthFormat: 1 143 | depthBufferSharingEnabled: 0 144 | lumin: 145 | depthFormat: 0 146 | frameTiming: 2 147 | enableGLCache: 0 148 | glCacheMaxBlobSize: 524288 149 | glCacheMaxFileSize: 8388608 150 | oculus: 151 | sharedDepthBuffer: 0 152 | dashSupport: 0 153 | lowOverheadMode: 0 154 | protectedContext: 0 155 | v2Signing: 0 156 | enable360StereoCapture: 0 157 | isWsaHolographicRemotingEnabled: 0 158 | protectGraphicsMemory: 0 159 | enableFrameTimingStats: 0 160 | useHDRDisplay: 0 161 | m_ColorGamuts: 00000000 162 | targetPixelDensity: 30 163 | resolutionScalingMode: 0 164 | androidSupportedAspectRatio: 1 165 | androidMaxAspectRatio: 2.1 166 | applicationIdentifier: {} 167 | buildNumber: {} 168 | AndroidBundleVersionCode: 1 169 | AndroidMinSdkVersion: 16 170 | AndroidTargetSdkVersion: 0 171 | AndroidPreferredInstallLocation: 1 172 | aotOptions: 173 | stripEngineCode: 1 174 | iPhoneStrippingLevel: 0 175 | iPhoneScriptCallOptimization: 0 176 | ForceInternetPermission: 0 177 | ForceSDCardPermission: 0 178 | CreateWallpaper: 0 179 | APKExpansionFiles: 0 180 | keepLoadedShadersAlive: 0 181 | StripUnusedMeshComponents: 1 182 | VertexChannelCompressionMask: 4054 183 | iPhoneSdkVersion: 988 184 | iOSTargetOSVersionString: 9.0 185 | tvOSSdkVersion: 0 186 | tvOSRequireExtendedGameController: 0 187 | tvOSTargetOSVersionString: 9.0 188 | uIPrerenderedIcon: 0 189 | uIRequiresPersistentWiFi: 0 190 | uIRequiresFullScreen: 1 191 | uIStatusBarHidden: 1 192 | uIExitOnSuspend: 0 193 | uIStatusBarStyle: 0 194 | iPhoneSplashScreen: {fileID: 0} 195 | iPhoneHighResSplashScreen: {fileID: 0} 196 | iPhoneTallHighResSplashScreen: {fileID: 0} 197 | iPhone47inSplashScreen: {fileID: 0} 198 | iPhone55inPortraitSplashScreen: {fileID: 0} 199 | iPhone55inLandscapeSplashScreen: {fileID: 0} 200 | iPhone58inPortraitSplashScreen: {fileID: 0} 201 | iPhone58inLandscapeSplashScreen: {fileID: 0} 202 | iPadPortraitSplashScreen: {fileID: 0} 203 | iPadHighResPortraitSplashScreen: {fileID: 0} 204 | iPadLandscapeSplashScreen: {fileID: 0} 205 | iPadHighResLandscapeSplashScreen: {fileID: 0} 206 | iPhone65inPortraitSplashScreen: {fileID: 0} 207 | iPhone65inLandscapeSplashScreen: {fileID: 0} 208 | iPhone61inPortraitSplashScreen: {fileID: 0} 209 | iPhone61inLandscapeSplashScreen: {fileID: 0} 210 | appleTVSplashScreen: {fileID: 0} 211 | appleTVSplashScreen2x: {fileID: 0} 212 | tvOSSmallIconLayers: [] 213 | tvOSSmallIconLayers2x: [] 214 | tvOSLargeIconLayers: [] 215 | tvOSLargeIconLayers2x: [] 216 | tvOSTopShelfImageLayers: [] 217 | tvOSTopShelfImageLayers2x: [] 218 | tvOSTopShelfImageWideLayers: [] 219 | tvOSTopShelfImageWideLayers2x: [] 220 | iOSLaunchScreenType: 0 221 | iOSLaunchScreenPortrait: {fileID: 0} 222 | iOSLaunchScreenLandscape: {fileID: 0} 223 | iOSLaunchScreenBackgroundColor: 224 | serializedVersion: 2 225 | rgba: 0 226 | iOSLaunchScreenFillPct: 100 227 | iOSLaunchScreenSize: 100 228 | iOSLaunchScreenCustomXibPath: 229 | iOSLaunchScreeniPadType: 0 230 | iOSLaunchScreeniPadImage: {fileID: 0} 231 | iOSLaunchScreeniPadBackgroundColor: 232 | serializedVersion: 2 233 | rgba: 0 234 | iOSLaunchScreeniPadFillPct: 100 235 | iOSLaunchScreeniPadSize: 100 236 | iOSLaunchScreeniPadCustomXibPath: 237 | iOSUseLaunchScreenStoryboard: 0 238 | iOSLaunchScreenCustomStoryboardPath: 239 | iOSDeviceRequirements: [] 240 | iOSURLSchemes: [] 241 | iOSBackgroundModes: 0 242 | iOSMetalForceHardShadows: 0 243 | metalEditorSupport: 1 244 | metalAPIValidation: 1 245 | iOSRenderExtraFrameOnPause: 0 246 | appleDeveloperTeamID: 247 | iOSManualSigningProvisioningProfileID: 248 | tvOSManualSigningProvisioningProfileID: 249 | iOSManualSigningProvisioningProfileType: 0 250 | tvOSManualSigningProvisioningProfileType: 0 251 | appleEnableAutomaticSigning: 0 252 | iOSRequireARKit: 0 253 | iOSAutomaticallyDetectAndAddCapabilities: 1 254 | appleEnableProMotion: 0 255 | clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 256 | templatePackageId: com.unity.3d@1.0.0 257 | templateDefaultScene: Assets/Scenes/SampleScene.unity 258 | AndroidTargetArchitectures: 5 259 | AndroidSplashScreenScale: 0 260 | androidSplashScreen: {fileID: 0} 261 | AndroidKeystoreName: '{inproject}: ' 262 | AndroidKeyaliasName: 263 | AndroidBuildApkPerCpuArchitecture: 0 264 | AndroidTVCompatibility: 1 265 | AndroidIsGame: 1 266 | AndroidEnableTango: 0 267 | androidEnableBanner: 1 268 | androidUseLowAccuracyLocation: 0 269 | androidUseCustomKeystore: 0 270 | m_AndroidBanners: 271 | - width: 320 272 | height: 180 273 | banner: {fileID: 0} 274 | androidGamepadSupportLevel: 0 275 | AndroidValidateAppBundleSize: 1 276 | AndroidAppBundleSizeToValidate: 150 277 | resolutionDialogBanner: {fileID: 0} 278 | m_BuildTargetIcons: [] 279 | m_BuildTargetPlatformIcons: [] 280 | m_BuildTargetBatching: 281 | - m_BuildTarget: Standalone 282 | m_StaticBatching: 1 283 | m_DynamicBatching: 0 284 | m_BuildTargetGraphicsAPIs: [] 285 | m_BuildTargetVRSettings: 286 | - m_BuildTarget: Standalone 287 | m_Enabled: 0 288 | m_Devices: 289 | - Oculus 290 | - OpenVR 291 | openGLRequireES31: 0 292 | openGLRequireES31AEP: 0 293 | openGLRequireES32: 0 294 | vuforiaEnabled: 0 295 | m_TemplateCustomTags: {} 296 | mobileMTRendering: 297 | Android: 1 298 | iPhone: 1 299 | tvOS: 1 300 | m_BuildTargetGroupLightmapEncodingQuality: [] 301 | m_BuildTargetGroupLightmapSettings: [] 302 | playModeTestRunnerEnabled: 0 303 | runPlayModeTestAsEditModeTest: 0 304 | actionOnDotNetUnhandledException: 1 305 | enableInternalProfiler: 0 306 | logObjCUncaughtExceptions: 1 307 | enableCrashReportAPI: 0 308 | cameraUsageDescription: 309 | locationUsageDescription: 310 | microphoneUsageDescription: 311 | switchNetLibKey: 312 | switchSocketMemoryPoolSize: 6144 313 | switchSocketAllocatorPoolSize: 128 314 | switchSocketConcurrencyLimit: 14 315 | switchScreenResolutionBehavior: 2 316 | switchUseCPUProfiler: 0 317 | switchApplicationID: 0x01004b9000490000 318 | switchNSODependencies: 319 | switchTitleNames_0: 320 | switchTitleNames_1: 321 | switchTitleNames_2: 322 | switchTitleNames_3: 323 | switchTitleNames_4: 324 | switchTitleNames_5: 325 | switchTitleNames_6: 326 | switchTitleNames_7: 327 | switchTitleNames_8: 328 | switchTitleNames_9: 329 | switchTitleNames_10: 330 | switchTitleNames_11: 331 | switchTitleNames_12: 332 | switchTitleNames_13: 333 | switchTitleNames_14: 334 | switchPublisherNames_0: 335 | switchPublisherNames_1: 336 | switchPublisherNames_2: 337 | switchPublisherNames_3: 338 | switchPublisherNames_4: 339 | switchPublisherNames_5: 340 | switchPublisherNames_6: 341 | switchPublisherNames_7: 342 | switchPublisherNames_8: 343 | switchPublisherNames_9: 344 | switchPublisherNames_10: 345 | switchPublisherNames_11: 346 | switchPublisherNames_12: 347 | switchPublisherNames_13: 348 | switchPublisherNames_14: 349 | switchIcons_0: {fileID: 0} 350 | switchIcons_1: {fileID: 0} 351 | switchIcons_2: {fileID: 0} 352 | switchIcons_3: {fileID: 0} 353 | switchIcons_4: {fileID: 0} 354 | switchIcons_5: {fileID: 0} 355 | switchIcons_6: {fileID: 0} 356 | switchIcons_7: {fileID: 0} 357 | switchIcons_8: {fileID: 0} 358 | switchIcons_9: {fileID: 0} 359 | switchIcons_10: {fileID: 0} 360 | switchIcons_11: {fileID: 0} 361 | switchIcons_12: {fileID: 0} 362 | switchIcons_13: {fileID: 0} 363 | switchIcons_14: {fileID: 0} 364 | switchSmallIcons_0: {fileID: 0} 365 | switchSmallIcons_1: {fileID: 0} 366 | switchSmallIcons_2: {fileID: 0} 367 | switchSmallIcons_3: {fileID: 0} 368 | switchSmallIcons_4: {fileID: 0} 369 | switchSmallIcons_5: {fileID: 0} 370 | switchSmallIcons_6: {fileID: 0} 371 | switchSmallIcons_7: {fileID: 0} 372 | switchSmallIcons_8: {fileID: 0} 373 | switchSmallIcons_9: {fileID: 0} 374 | switchSmallIcons_10: {fileID: 0} 375 | switchSmallIcons_11: {fileID: 0} 376 | switchSmallIcons_12: {fileID: 0} 377 | switchSmallIcons_13: {fileID: 0} 378 | switchSmallIcons_14: {fileID: 0} 379 | switchManualHTML: 380 | switchAccessibleURLs: 381 | switchLegalInformation: 382 | switchMainThreadStackSize: 1048576 383 | switchPresenceGroupId: 384 | switchLogoHandling: 0 385 | switchReleaseVersion: 0 386 | switchDisplayVersion: 1.0.0 387 | switchStartupUserAccount: 0 388 | switchTouchScreenUsage: 0 389 | switchSupportedLanguagesMask: 0 390 | switchLogoType: 0 391 | switchApplicationErrorCodeCategory: 392 | switchUserAccountSaveDataSize: 0 393 | switchUserAccountSaveDataJournalSize: 0 394 | switchApplicationAttribute: 0 395 | switchCardSpecSize: -1 396 | switchCardSpecClock: -1 397 | switchRatingsMask: 0 398 | switchRatingsInt_0: 0 399 | switchRatingsInt_1: 0 400 | switchRatingsInt_2: 0 401 | switchRatingsInt_3: 0 402 | switchRatingsInt_4: 0 403 | switchRatingsInt_5: 0 404 | switchRatingsInt_6: 0 405 | switchRatingsInt_7: 0 406 | switchRatingsInt_8: 0 407 | switchRatingsInt_9: 0 408 | switchRatingsInt_10: 0 409 | switchRatingsInt_11: 0 410 | switchLocalCommunicationIds_0: 411 | switchLocalCommunicationIds_1: 412 | switchLocalCommunicationIds_2: 413 | switchLocalCommunicationIds_3: 414 | switchLocalCommunicationIds_4: 415 | switchLocalCommunicationIds_5: 416 | switchLocalCommunicationIds_6: 417 | switchLocalCommunicationIds_7: 418 | switchParentalControl: 0 419 | switchAllowsScreenshot: 1 420 | switchAllowsVideoCapturing: 1 421 | switchAllowsRuntimeAddOnContentInstall: 0 422 | switchDataLossConfirmation: 0 423 | switchUserAccountLockEnabled: 0 424 | switchSystemResourceMemory: 16777216 425 | switchSupportedNpadStyles: 3 426 | switchNativeFsCacheSize: 32 427 | switchIsHoldTypeHorizontal: 0 428 | switchSupportedNpadCount: 8 429 | switchSocketConfigEnabled: 0 430 | switchTcpInitialSendBufferSize: 32 431 | switchTcpInitialReceiveBufferSize: 64 432 | switchTcpAutoSendBufferSizeMax: 256 433 | switchTcpAutoReceiveBufferSizeMax: 256 434 | switchUdpSendBufferSize: 9 435 | switchUdpReceiveBufferSize: 42 436 | switchSocketBufferEfficiency: 4 437 | switchSocketInitializeEnabled: 1 438 | switchNetworkInterfaceManagerInitializeEnabled: 1 439 | switchPlayerConnectionEnabled: 1 440 | ps4NPAgeRating: 12 441 | ps4NPTitleSecret: 442 | ps4NPTrophyPackPath: 443 | ps4ParentalLevel: 11 444 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 445 | ps4Category: 0 446 | ps4MasterVersion: 01.00 447 | ps4AppVersion: 01.00 448 | ps4AppType: 0 449 | ps4ParamSfxPath: 450 | ps4VideoOutPixelFormat: 0 451 | ps4VideoOutInitialWidth: 1920 452 | ps4VideoOutBaseModeInitialWidth: 1920 453 | ps4VideoOutReprojectionRate: 60 454 | ps4PronunciationXMLPath: 455 | ps4PronunciationSIGPath: 456 | ps4BackgroundImagePath: 457 | ps4StartupImagePath: 458 | ps4StartupImagesFolder: 459 | ps4IconImagesFolder: 460 | ps4SaveDataImagePath: 461 | ps4SdkOverride: 462 | ps4BGMPath: 463 | ps4ShareFilePath: 464 | ps4ShareOverlayImagePath: 465 | ps4PrivacyGuardImagePath: 466 | ps4NPtitleDatPath: 467 | ps4RemotePlayKeyAssignment: -1 468 | ps4RemotePlayKeyMappingDir: 469 | ps4PlayTogetherPlayerCount: 0 470 | ps4EnterButtonAssignment: 1 471 | ps4ApplicationParam1: 0 472 | ps4ApplicationParam2: 0 473 | ps4ApplicationParam3: 0 474 | ps4ApplicationParam4: 0 475 | ps4DownloadDataSize: 0 476 | ps4GarlicHeapSize: 2048 477 | ps4ProGarlicHeapSize: 2560 478 | playerPrefsMaxSize: 32768 479 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 480 | ps4pnSessions: 1 481 | ps4pnPresence: 1 482 | ps4pnFriends: 1 483 | ps4pnGameCustomData: 1 484 | playerPrefsSupport: 0 485 | enableApplicationExit: 0 486 | resetTempFolder: 1 487 | restrictedAudioUsageRights: 0 488 | ps4UseResolutionFallback: 0 489 | ps4ReprojectionSupport: 0 490 | ps4UseAudio3dBackend: 0 491 | ps4SocialScreenEnabled: 0 492 | ps4ScriptOptimizationLevel: 0 493 | ps4Audio3dVirtualSpeakerCount: 14 494 | ps4attribCpuUsage: 0 495 | ps4PatchPkgPath: 496 | ps4PatchLatestPkgPath: 497 | ps4PatchChangeinfoPath: 498 | ps4PatchDayOne: 0 499 | ps4attribUserManagement: 0 500 | ps4attribMoveSupport: 0 501 | ps4attrib3DSupport: 0 502 | ps4attribShareSupport: 0 503 | ps4attribExclusiveVR: 0 504 | ps4disableAutoHideSplash: 0 505 | ps4videoRecordingFeaturesUsed: 0 506 | ps4contentSearchFeaturesUsed: 0 507 | ps4attribEyeToEyeDistanceSettingVR: 0 508 | ps4IncludedModules: [] 509 | monoEnv: 510 | splashScreenBackgroundSourceLandscape: {fileID: 0} 511 | splashScreenBackgroundSourcePortrait: {fileID: 0} 512 | blurSplashScreenBackground: 1 513 | spritePackerPolicy: 514 | webGLMemorySize: 256 515 | webGLExceptionSupport: 1 516 | webGLNameFilesAsHashes: 0 517 | webGLDataCaching: 0 518 | webGLDebugSymbols: 0 519 | webGLEmscriptenArgs: 520 | webGLModulesDirectory: 521 | webGLTemplate: APPLICATION:Default 522 | webGLAnalyzeBuildSize: 0 523 | webGLUseEmbeddedResources: 0 524 | webGLCompressionFormat: 1 525 | webGLLinkerTarget: 0 526 | webGLThreadsSupport: 0 527 | webGLWasmStreaming: 0 528 | scriptingDefineSymbols: 529 | 1: UNITY_POST_PROCESSING_STACK_V2 530 | 4: UNITY_POST_PROCESSING_STACK_V2 531 | 7: UNITY_POST_PROCESSING_STACK_V2 532 | 13: UNITY_POST_PROCESSING_STACK_V2 533 | 17: UNITY_POST_PROCESSING_STACK_V2 534 | 18: UNITY_POST_PROCESSING_STACK_V2 535 | 19: UNITY_POST_PROCESSING_STACK_V2 536 | 21: UNITY_POST_PROCESSING_STACK_V2 537 | 23: UNITY_POST_PROCESSING_STACK_V2 538 | 24: UNITY_POST_PROCESSING_STACK_V2 539 | 25: UNITY_POST_PROCESSING_STACK_V2 540 | 26: UNITY_POST_PROCESSING_STACK_V2 541 | 27: UNITY_POST_PROCESSING_STACK_V2 542 | platformArchitecture: {} 543 | scriptingBackend: 544 | Standalone: 1 545 | il2cppCompilerConfiguration: {} 546 | managedStrippingLevel: {} 547 | incrementalIl2cppBuild: {} 548 | allowUnsafeCode: 0 549 | additionalIl2CppArgs: 550 | scriptingRuntimeVersion: 1 551 | gcIncremental: 0 552 | gcWBarrierValidation: 0 553 | apiCompatibilityLevelPerPlatform: {} 554 | m_RenderingPath: 1 555 | m_MobileRenderingPath: 1 556 | metroPackageName: Template_3D 557 | metroPackageVersion: 558 | metroCertificatePath: 559 | metroCertificatePassword: 560 | metroCertificateSubject: 561 | metroCertificateIssuer: 562 | metroCertificateNotAfter: 0000000000000000 563 | metroApplicationDescription: Template_3D 564 | wsaImages: {} 565 | metroTileShortName: 566 | metroTileShowName: 0 567 | metroMediumTileShowName: 0 568 | metroLargeTileShowName: 0 569 | metroWideTileShowName: 0 570 | metroSupportStreamingInstall: 0 571 | metroLastRequiredScene: 0 572 | metroDefaultTileSize: 1 573 | metroTileForegroundText: 2 574 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 575 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 576 | a: 1} 577 | metroSplashScreenUseBackgroundColor: 0 578 | platformCapabilities: {} 579 | metroTargetDeviceFamilies: {} 580 | metroFTAName: 581 | metroFTAFileTypes: [] 582 | metroProtocolName: 583 | XboxOneProductId: 584 | XboxOneUpdateKey: 585 | XboxOneSandboxId: 586 | XboxOneContentId: 587 | XboxOneTitleId: 588 | XboxOneSCId: 589 | XboxOneGameOsOverridePath: 590 | XboxOnePackagingOverridePath: 591 | XboxOneAppManifestOverridePath: 592 | XboxOneVersion: 1.0.0.0 593 | XboxOnePackageEncryption: 0 594 | XboxOnePackageUpdateGranularity: 2 595 | XboxOneDescription: 596 | XboxOneLanguage: 597 | - enus 598 | XboxOneCapability: [] 599 | XboxOneGameRating: {} 600 | XboxOneIsContentPackage: 0 601 | XboxOneEnableGPUVariability: 0 602 | XboxOneSockets: {} 603 | XboxOneSplashScreen: {fileID: 0} 604 | XboxOneAllowedProductIds: [] 605 | XboxOnePersistentLocalStorageSize: 0 606 | XboxOneXTitleMemory: 8 607 | xboxOneScriptCompiler: 1 608 | XboxOneOverrideIdentityName: 609 | vrEditorSettings: 610 | daydream: 611 | daydreamIconForeground: {fileID: 0} 612 | daydreamIconBackground: {fileID: 0} 613 | cloudServicesEnabled: 614 | UNet: 1 615 | luminIcon: 616 | m_Name: 617 | m_ModelFolderPath: 618 | m_PortalFolderPath: 619 | luminCert: 620 | m_CertPath: 621 | m_SignPackage: 1 622 | luminIsChannelApp: 0 623 | luminVersion: 624 | m_VersionCode: 1 625 | m_VersionName: 626 | facebookSdkVersion: 7.9.4 627 | facebookAppId: 628 | facebookCookies: 1 629 | facebookLogging: 1 630 | facebookStatus: 1 631 | facebookXfbml: 0 632 | facebookFrictionlessRequests: 1 633 | apiCompatibilityLevel: 6 634 | cloudProjectId: 3f236cd8-7f42-4f88-8c68-5d4c0c693307 635 | framebufferDepthMemorylessMode: 0 636 | projectName: IngameDeveloperConsole 637 | organizationId: maltewei 638 | cloudEnabled: 0 639 | enableNativePlatformBackendsForNewInputSystem: 0 640 | disableOldInputManagerSupport: 0 641 | legacyClampBlendShapeWeights: 1 642 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.2.6f1 2 | m_EditorVersionWithRevision: 2019.2.6f1 (fe82a0e88406) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /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 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.0167 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 1 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | ![alt text](https://raw.githubusercontent.com/Moolt/UnityIngameConsole/master/Documentation/screenshot.gif "screenshot") 4 | 5 | This handy Unity plug-in helps you to implement your own developer console for your game. It's very easy to set up and enables you to call already existing code from the console with little to none effort. 6 | 7 | The plug-in also comes with a ui prefab that works out of the box but can be easily extended to your hearts content. There's also a networking prefab to call commands via a TCP client. 8 | 9 | ## Setup 10 | 11 | If you want to get a quick overview you should check out the [demo project](https://github.com/Moolt/UnityIngameConsole/archive/master.zip). 12 | You can also download the [package](https://github.com/Moolt/UnityIngameConsole/raw/master/ingame-console.unitypackage) containing only the essential scripts and assets. 13 | 14 | If you chose to download the package, you first need to create a canvas. Then drop the `Prefabs/Console/Console.prefab` into the canvas and you're done. Start the game and open the console with `Tab`, which is the default key. 15 | 16 | Try using the default commands like `help` or `chelp`. 17 | 18 | # Extension 19 | Inside of the `ConsoleLogic` script there are already some predefined commands like `help`, `chelp`, `quit`, `close` and `clear`. 20 | Implementing your own commands is very easy and will be shown in the examples below. 21 | 22 | ## Implementing commands 23 | 24 | The console searches for __objects in the scene__ with executable scripts. You can mark your script as executable by adding the `[ExecutableFromConsole]` attribute just above the class definition. 25 | 26 | Aditionally, you have to mark the methods you want to call from the console by adding the `[ConsoleMethod]` attribute to them. This attribute takes two arguments: The `command name` and a `description` (optional). The description will be shown if you call `chelp` for the command. 27 | 28 | The code below is taken from the demo project. The method `RotateCubeBy` is registered as the `cube_rotate` command and takes one parameter. 29 | 30 | `cube_rotation` takes no parameter and just outputs text to the console using an instance of the `FormattedWriter` class. 31 | 32 | ```csharp 33 | [ExecutableFromConsole] 34 | public class GameControllerCommands : MonoBehaviour 35 | { 36 | public GameObject cube; 37 | private BaseWriter _writer = new FormattedWriter(); 38 | 39 | [ConsoleMethod("cube_rotate", "Rotates the cube by to the given angle.")] 40 | public void RotateCubeBy(float degrees) 41 | { 42 | cube.transform.Rotate(Vector3.up, degrees, Space.World); 43 | } 44 | 45 | [ConsoleMethod("cube_rotation", "Prints the current rotation of the cube.")] 46 | public void GetRotation() 47 | { 48 | _writer.NextLine(); 49 | _writer.Write("Current rotation is: "); 50 | _writer.WriteBold(cube.transform.rotation.eulerAngles.ToString()); 51 | } 52 | 53 | // [...] 54 | } 55 | ``` 56 | 57 | ## Documenting parameters 58 | 59 | Similar to methods, parameters can also be documented. This is strictly optional though. 60 | When `chelp` is called for a command, the default parameter names are displayed for the usage example. 61 | You can be more specific by adding a `[ConsoleParameter]` attribute with defining a custom description for the parameter. 62 | 63 | ```csharp 64 | //[...] 65 | public void ScaleCubeBy([ConsoleParameter("Factor. 1 is default")] float factor) 66 | { 67 | //[...] 68 | } 69 | ``` 70 | 71 | The image below shows a default parameter-name and a custom description using `[ConsoleParameter]`. 72 | 73 | ![alt text](https://raw.githubusercontent.com/Moolt/UnityIngameConsole/master/Documentation/chelp.png "screenshot") 74 | 75 | # Limitations and trouble shooting 76 | 77 | If you run into any problems, you may find some answers here. 78 | 79 | ## Execution targets 80 | 81 | If you want the commands of any script to appear in the console, there should always be an instance of it in the scene. 82 | Scripts without instances will __not__ show up in the console. 83 | 84 | ## Ambiguity 85 | 86 | 1. GameObjects containing executable scripts should be limited to one instance per scene to avoid ambiguity. 87 | 2. Commands should have distinct names across all executable scripts. 88 | 3. Only use one `BaseConsoleIO` instance per scene. You cannot use both `NetworkIO` and `ConsoleIO` concurrently. 89 | 90 | # Good to know 91 | 92 | These things might be helpful for you while working with the console. 93 | 94 | ## Strings as parameters 95 | 96 | ![alt text](https://raw.githubusercontent.com/Moolt/UnityIngameConsole/master/Documentation/strings.png "screenshot") 97 | 98 | As long as the string, you want to pass, doesn't contain any spaces, you don't need to add quotes. When there are spaces, however, your string parameter has to start and end with double quotes so it can be interpreted as a single parameter. 99 | 100 | If the string should also contain double quotes the escape sequence `\"` can be used. 101 | 102 | ## GameObjects as parameters 103 | 104 | `GameObjects` in the scene can also be passed to methods as parameters. 105 | If you pass a `GameObjects` name to the command, the reference to the `GameObject` will automatically be resolved and passed to the function. 106 | 107 | ```csharp 108 | [ConsoleMethod("destroy", "Destroys the object with the given name.")] 109 | public void DestroyObject([ConsoleParameter("Name of object.")] GameObject gameObject) 110 | { 111 | Destroy(gameObject); 112 | } 113 | ``` 114 | 115 | The command above could be used like 116 | 117 | ``> destroy someObject`` 118 | 119 | or 120 | 121 | ``> destroy "some object"`` for names containing spaces. 122 | 123 | ## Vectors as parameters 124 | 125 | For `Vector3` or `Vector2` types, just pass the different axis values separated by commas __without spaces__. 126 | 127 | ### Vector3 128 | |Input|Result| 129 | |-|-| 130 | | some_command 1,2,3 | new Vector3(1f, 2f, 3f)| 131 | | some_command 1,2 | new Vector3(1f, 2, 0f)| 132 | | some_command 1 | new Vector3(1f, 1f, 1f)| 133 | 134 | ### Vector 2 135 | |Input|Result| 136 | |-|-| 137 | | some_command 1,2 | new Vector2(1f, 2f)| 138 | | some_command 1 | new Vector2(1f, 1f)| 139 | 140 | ## Colors 141 | 142 | Colors can also be passed as parameters. Currently `r, g, b, a`, `r, g, b`, `Hex values` and `color names` are supported. 143 | 144 | |Input|Result| 145 | |-|-| 146 | | some_command 255,0,0,255 | new Color(1f, 0f, 0f, 1f)| 147 | | some_command 255,0,0 | new Color(1f, 0f, 0f)| 148 | | some_command #00FF00 | new Color(0f, 1f, 0f)| 149 | | some_command blue | new Color(0f, 0f, 1f)| 150 | 151 | See the [unity documentation](https://docs.unity3d.com/ScriptReference/Color.html) for a comprehensive list of the supported colors. The input is case insensitive, so `bLuE` is a valid color. 152 | 153 | ## Custom conversions 154 | 155 | In order to write your own conversions, you have to create a new class inheriting from `BaseConverter`, where the generic parameter `T` is the type you want to convert to. 156 | 157 | Every conversion method has to be tagged with the `[ConversionMethod]` attribute. The methods names are irrelevant, only the parameters are important. When the user enters two parameters, like `1,2`, the BaseConverter will search for any method with two parameters and tries to convert the types accordingly. If no errors occur up to this point, the conversion method will be invoked. 158 | This all happens automatically, so you don't have to register your new class anywhere and there is really no other logic to implement than the actual conversion. A complete implementation could look like the following example: 159 | 160 | ```csharp 161 | public class Vector2Converter : BaseConverter 162 | { 163 | [ConversionMethod] 164 | public Vector2 Convert(float x, float y) 165 | { 166 | return new Vector2(x, y); 167 | } 168 | 169 | [ConversionMethod] 170 | public Vector2 Convert(float x) 171 | { 172 | return Vector2.one * x; 173 | } 174 | } 175 | ``` 176 | Try to avoid ambiguities. 177 | 1. There should always be only one conversion class per type. 178 | 2. Conversion methods are identified by their parameter count. Don't implement several methods with the same amount of parameters, even if the types are different. 179 | 180 | ## Input history 181 | 182 | All commands entered by the user are stored. Use the arrow keys to navigate through earlier inputs. 183 | The amout of commands stored is limited to 10 by default. 184 | 185 | # Extendable IO 186 | 187 | ![alt text](https://raw.githubusercontent.com/Moolt/UnityIngameConsole/master/Documentation/diagram.png "screenshot") 188 | 189 | The `ConsoleLogic` script reads and writes to the UI via the `ConsoleIO` script. `ConsoleIO` inherits from the `BaseConsoleIO` abstract class and can therefore be replaced with any other class inheriting from this base class. 190 | 191 | ![alt text](https://raw.githubusercontent.com/Moolt/UnityIngameConsole/master/Documentation/console.png "screenshot") 192 | 193 | As an example, I've also implemented a `NetworkIO` class that starts a TCP server to receive commands remotely. The client will send the input to the server, is executed and the output will then be sent back to the client. A client implementation can be downloded [here](https://github.com/Moolt/ConsoleClient). 194 | 195 | A custom `BaseConsoleIO` implementation usually requires you to also implement a custom `BaseWriter` class to format the output correctly. 196 | -------------------------------------------------------------------------------- /ingame-console.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/UnityIngameConsole/b64510dce1879db105e2735ff90afb80c36f7866/ingame-console.unitypackage --------------------------------------------------------------------------------