Initial commit logcat
This commit is contained in:
Коммит
fc4ce76d9b
|
@ -0,0 +1,28 @@
|
|||
[Aa]rtifacts/
|
||||
[Bb]uild/
|
||||
[Ll]ibrary/
|
||||
[Oo]bj/
|
||||
[Tt]emp/
|
||||
[Ss]treaming[Aa]ssets/
|
||||
[Ll]ogs/
|
||||
.vs
|
||||
.vscode
|
||||
.idea
|
||||
.DS_Store
|
||||
*.aspx
|
||||
*.browser
|
||||
*.csproj
|
||||
*.exe
|
||||
*.ini
|
||||
*.map
|
||||
*.mdb
|
||||
*.npmrc
|
||||
*.pyc
|
||||
*.resS
|
||||
*.sdf
|
||||
*.sln
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
*.suo
|
||||
*.userprefs
|
||||
.npmrc
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4f704ae4b4f98ae41a0bce26658850c1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,259 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 170076734}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 10
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 10
|
||||
m_AtlasSize: 512
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 256
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &170076733
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 170076735}
|
||||
- component: {fileID: 170076734}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &170076734
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 170076733}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &170076735
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 170076733}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &534669902
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 534669905}
|
||||
- component: {fileID: 534669904}
|
||||
- component: {fileID: 534669903}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &534669903
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &534669904
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_GateFitMode: 2
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &534669905
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.mobile.android-logcat": "file:../../../com.unity.mobile.android-logcat"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!11 &1
|
||||
AudioManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Volume: 1
|
||||
Rolloff Scale: 1
|
||||
Doppler Factor: 1
|
||||
Default Speaker Mode: 2
|
||||
m_SampleRate: 0
|
||||
m_DSPBufferSize: 1024
|
||||
m_VirtualVoiceCount: 512
|
||||
m_RealVoiceCount: 32
|
||||
m_SpatializerPlugin:
|
||||
m_AmbisonicDecoderPlugin:
|
||||
m_DisableAudio: 0
|
||||
m_VirtualizeEffects: 1
|
|
@ -0,0 +1,6 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!236 &1
|
||||
ClusterInputManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Inputs: []
|
|
@ -0,0 +1,29 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!55 &1
|
||||
PhysicsManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Gravity: {x: 0, y: -9.81, z: 0}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_BounceThreshold: 2
|
||||
m_SleepThreshold: 0.005
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_DefaultSolverIterations: 6
|
||||
m_DefaultSolverVelocityIterations: 1
|
||||
m_QueriesHitBackfaces: 0
|
||||
m_QueriesHitTriggers: 1
|
||||
m_EnableAdaptiveForce: 0
|
||||
m_ClothInterCollisionDistance: 0
|
||||
m_ClothInterCollisionStiffness: 0
|
||||
m_ContactsGeneration: 1
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_AutoSimulation: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_ClothInterCollisionSettingsToggle: 0
|
||||
m_ContactPairsMode: 0
|
||||
m_BroadphaseType: 0
|
||||
m_WorldBounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 250, y: 250, z: 250}
|
||||
m_WorldSubdivisions: 8
|
|
@ -0,0 +1,11 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1045 &1
|
||||
EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/SampleScene.unity
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
m_configObjects: {}
|
|
@ -0,0 +1,21 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!159 &1
|
||||
EditorSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 7
|
||||
m_ExternalVersionControlSupport: Visible Meta Files
|
||||
m_SerializationMode: 2
|
||||
m_LineEndingsForNewScripts: 2
|
||||
m_DefaultBehaviorMode: 0
|
||||
m_SpritePackerMode: 0
|
||||
m_SpritePackerPaddingPower: 1
|
||||
m_EtcTextureCompressorBehavior: 1
|
||||
m_EtcTextureFastCompressor: 1
|
||||
m_EtcTextureNormalCompressor: 2
|
||||
m_EtcTextureBestCompressor: 4
|
||||
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
|
||||
m_ProjectGenerationRootNamespace:
|
||||
m_UserGeneratedProjectSuffix:
|
||||
m_CollabEditorSettings:
|
||||
inProgressEnabled: 1
|
|
@ -0,0 +1,62 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!30 &1
|
||||
GraphicsSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_Deferred:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DeferredReflections:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ScreenSpaceShadows:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LegacyDeferred:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DepthNormals:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_MotionVectors:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightHalo:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LensFlare:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_AlwaysIncludedShaders:
|
||||
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
m_CustomRenderPipeline: {fileID: 0}
|
||||
m_TransparencySortMode: 0
|
||||
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
||||
m_DefaultRenderingPath: 1
|
||||
m_DefaultMobileRenderingPath: 1
|
||||
m_TierSettings: []
|
||||
m_LightmapStripping: 0
|
||||
m_FogStripping: 0
|
||||
m_InstancingStripping: 0
|
||||
m_LightmapKeepPlain: 1
|
||||
m_LightmapKeepDirCombined: 1
|
||||
m_LightmapKeepDynamicPlain: 1
|
||||
m_LightmapKeepDynamicDirCombined: 1
|
||||
m_LightmapKeepShadowMask: 1
|
||||
m_LightmapKeepSubtractive: 1
|
||||
m_FogKeepLinear: 1
|
||||
m_FogKeepExp: 1
|
||||
m_FogKeepExp2: 1
|
||||
m_AlbedoSwatchInfos: []
|
||||
m_LightsUseLinearIntensity: 0
|
||||
m_LightsUseColorTemperature: 0
|
|
@ -0,0 +1,295 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!13 &1
|
||||
InputManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Axes:
|
||||
- serializedVersion: 3
|
||||
m_Name: Horizontal
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: left
|
||||
positiveButton: right
|
||||
altNegativeButton: a
|
||||
altPositiveButton: d
|
||||
gravity: 3
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Vertical
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: down
|
||||
positiveButton: up
|
||||
altNegativeButton: s
|
||||
altPositiveButton: w
|
||||
gravity: 3
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire1
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left ctrl
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 0
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire2
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left alt
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 1
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire3
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: left shift
|
||||
altNegativeButton:
|
||||
altPositiveButton: mouse 2
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Jump
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: space
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse X
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse Y
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 1
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Mouse ScrollWheel
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 1
|
||||
axis: 2
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Horizontal
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 2
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Vertical
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
invert: 1
|
||||
type: 2
|
||||
axis: 1
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire1
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 0
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire2
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 1
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Fire3
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 2
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Jump
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: joystick button 3
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Submit
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: return
|
||||
altNegativeButton:
|
||||
altPositiveButton: joystick button 0
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Submit
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: enter
|
||||
altNegativeButton:
|
||||
altPositiveButton: space
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Cancel
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton:
|
||||
positiveButton: escape
|
||||
altNegativeButton:
|
||||
altPositiveButton: joystick button 1
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
|
@ -0,0 +1,91 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!126 &1
|
||||
NavMeshProjectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
areas:
|
||||
- name: Walkable
|
||||
cost: 1
|
||||
- name: Not Walkable
|
||||
cost: 1
|
||||
- name: Jump
|
||||
cost: 2
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
- name:
|
||||
cost: 1
|
||||
m_LastAgentTypeID: -887442657
|
||||
m_Settings:
|
||||
- serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.75
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_SettingNames:
|
||||
- Humanoid
|
|
@ -0,0 +1,8 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!149 &1
|
||||
NetworkManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_DebugLevel: 0
|
||||
m_Sendrate: 15
|
||||
m_AssetToPrefab: {}
|
|
@ -0,0 +1,37 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!19 &1
|
||||
Physics2DSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 4
|
||||
m_Gravity: {x: 0, y: -9.81}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_VelocityIterations: 8
|
||||
m_PositionIterations: 3
|
||||
m_VelocityThreshold: 1
|
||||
m_MaxLinearCorrection: 0.2
|
||||
m_MaxAngularCorrection: 8
|
||||
m_MaxTranslationSpeed: 100
|
||||
m_MaxRotationSpeed: 360
|
||||
m_BaumgarteScale: 0.2
|
||||
m_BaumgarteTimeOfImpactScale: 0.75
|
||||
m_TimeToSleep: 0.5
|
||||
m_LinearSleepTolerance: 0.01
|
||||
m_AngularSleepTolerance: 2
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_AutoSimulation: 1
|
||||
m_QueriesHitTriggers: 1
|
||||
m_QueriesStartInColliders: 1
|
||||
m_ChangeStopsCallbacks: 0
|
||||
m_CallbacksOnDisable: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_AlwaysShowColliders: 0
|
||||
m_ShowColliderSleep: 1
|
||||
m_ShowColliderContacts: 0
|
||||
m_ShowColliderAABB: 0
|
||||
m_ContactArrowScale: 0.2
|
||||
m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
|
||||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
@ -0,0 +1,27 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1386491679 &1
|
||||
PresetManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_DefaultList:
|
||||
- type:
|
||||
m_NativeTypeID: 108
|
||||
m_ManagedTypePPtr: {fileID: 0}
|
||||
m_ManagedTypeFallback:
|
||||
defaultPresets:
|
||||
- m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea,
|
||||
type: 2}
|
||||
- type:
|
||||
m_NativeTypeID: 1020
|
||||
m_ManagedTypePPtr: {fileID: 0}
|
||||
m_ManagedTypeFallback:
|
||||
defaultPresets:
|
||||
- m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6,
|
||||
type: 2}
|
||||
- type:
|
||||
m_NativeTypeID: 1006
|
||||
m_ManagedTypePPtr: {fileID: 0}
|
||||
m_ManagedTypeFallback:
|
||||
defaultPresets:
|
||||
- m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9,
|
||||
type: 2}
|
|
@ -0,0 +1,618 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!129 &1
|
||||
PlayerSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 15
|
||||
productGUID: 9e0d97b4e9f2b244ab561a1639bc49cd
|
||||
AndroidProfiler: 0
|
||||
AndroidFilterTouchesWhenObscured: 0
|
||||
AndroidEnableSustainedPerformanceMode: 0
|
||||
defaultScreenOrientation: 4
|
||||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: DefaultCompany
|
||||
productName: SampleProject1
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
m_SplashScreenLogoStyle: 1
|
||||
m_SplashScreenDrawMode: 0
|
||||
m_SplashScreenBackgroundAnimationZoom: 1
|
||||
m_SplashScreenLogoAnimationZoom: 1
|
||||
m_SplashScreenBackgroundLandscapeAspect: 1
|
||||
m_SplashScreenBackgroundPortraitAspect: 1
|
||||
m_SplashScreenBackgroundLandscapeUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenBackgroundPortraitUvs:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenLogos: []
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
m_StereoRenderingPath: 0
|
||||
m_ActiveColorSpace: 0
|
||||
m_MTRendering: 1
|
||||
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||
iosShowActivityIndicatorOnLoading: -1
|
||||
androidShowActivityIndicatorOnLoading: -1
|
||||
iosAppInBackgroundBehavior: 0
|
||||
displayResolutionDialog: 1
|
||||
iosAllowHTTPDownload: 1
|
||||
allowedAutorotateToPortrait: 1
|
||||
allowedAutorotateToPortraitUpsideDown: 1
|
||||
allowedAutorotateToLandscapeRight: 1
|
||||
allowedAutorotateToLandscapeLeft: 1
|
||||
useOSAutorotation: 1
|
||||
use32BitDisplayBuffer: 1
|
||||
preserveFramebufferAlpha: 0
|
||||
disableDepthAndStencilBuffers: 0
|
||||
androidStartInFullscreen: 1
|
||||
androidBlitType: 0
|
||||
defaultIsNativeResolution: 1
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 1
|
||||
captureSingleScreen: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
Force IOS Speakers When Recording: 0
|
||||
deferSystemGesturesMode: 0
|
||||
hideHomeButton: 0
|
||||
submitAnalytics: 1
|
||||
usePlayerLog: 1
|
||||
bakeCollisionMeshes: 0
|
||||
forceSingleInstance: 0
|
||||
resizableWindow: 0
|
||||
useMacAppStoreValidation: 0
|
||||
macAppStoreCategory: public.app-category.games
|
||||
gpuSkinning: 1
|
||||
graphicsJobs: 0
|
||||
xboxPIXTextureCapture: 0
|
||||
xboxEnableAvatar: 0
|
||||
xboxEnableKinect: 0
|
||||
xboxEnableKinectAutoTracking: 0
|
||||
xboxEnableFitness: 0
|
||||
visibleInBackground: 1
|
||||
allowFullscreenSwitch: 1
|
||||
graphicsJobMode: 0
|
||||
fullscreenMode: 1
|
||||
xboxSpeechDB: 0
|
||||
xboxEnableHeadOrientation: 0
|
||||
xboxEnableGuest: 0
|
||||
xboxEnablePIXSampling: 0
|
||||
metalFramebufferOnly: 0
|
||||
xboxOneResolution: 0
|
||||
xboxOneSResolution: 0
|
||||
xboxOneXResolution: 3
|
||||
xboxOneMonoLoggingLevel: 0
|
||||
xboxOneLoggingLevel: 1
|
||||
xboxOneDisableEsram: 0
|
||||
xboxOnePresentImmediateThreshold: 0
|
||||
switchQueueCommandMemory: 0
|
||||
vulkanEnableSetSRGBWrite: 0
|
||||
m_SupportedAspectRatios:
|
||||
4:3: 1
|
||||
5:4: 1
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.1
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
xboxOneDisableKinectGpuReservation: 0
|
||||
xboxOneEnable7thCore: 0
|
||||
vrSettings:
|
||||
cardboard:
|
||||
depthFormat: 0
|
||||
enableTransitionView: 0
|
||||
daydream:
|
||||
depthFormat: 0
|
||||
useSustainedPerformanceMode: 0
|
||||
enableVideoLayer: 0
|
||||
useProtectedVideoMemory: 0
|
||||
minimumSupportedHeadTracking: 0
|
||||
maximumSupportedHeadTracking: 1
|
||||
hololens:
|
||||
depthFormat: 1
|
||||
depthBufferSharingEnabled: 0
|
||||
oculus:
|
||||
sharedDepthBuffer: 0
|
||||
dashSupport: 0
|
||||
enable360StereoCapture: 0
|
||||
protectGraphicsMemory: 0
|
||||
enableFrameTimingStats: 0
|
||||
useHDRDisplay: 0
|
||||
m_ColorGamuts: 00000000
|
||||
targetPixelDensity: 30
|
||||
resolutionScalingMode: 0
|
||||
androidSupportedAspectRatio: 1
|
||||
androidMaxAspectRatio: 2.1
|
||||
applicationIdentifier: {}
|
||||
buildNumber: {}
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 16
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 1
|
||||
aotOptions:
|
||||
stripEngineCode: 1
|
||||
iPhoneStrippingLevel: 0
|
||||
iPhoneScriptCallOptimization: 0
|
||||
ForceInternetPermission: 0
|
||||
ForceSDCardPermission: 0
|
||||
CreateWallpaper: 0
|
||||
APKExpansionFiles: 0
|
||||
keepLoadedShadersAlive: 0
|
||||
StripUnusedMeshComponents: 1
|
||||
VertexChannelCompressionMask: 4054
|
||||
iPhoneSdkVersion: 988
|
||||
iOSTargetOSVersionString: 8.0
|
||||
tvOSSdkVersion: 0
|
||||
tvOSRequireExtendedGameController: 0
|
||||
tvOSTargetOSVersionString: 9.0
|
||||
uIPrerenderedIcon: 0
|
||||
uIRequiresPersistentWiFi: 0
|
||||
uIRequiresFullScreen: 1
|
||||
uIStatusBarHidden: 1
|
||||
uIExitOnSuspend: 0
|
||||
uIStatusBarStyle: 0
|
||||
iPhoneSplashScreen: {fileID: 0}
|
||||
iPhoneHighResSplashScreen: {fileID: 0}
|
||||
iPhoneTallHighResSplashScreen: {fileID: 0}
|
||||
iPhone47inSplashScreen: {fileID: 0}
|
||||
iPhone55inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone55inLandscapeSplashScreen: {fileID: 0}
|
||||
iPhone58inPortraitSplashScreen: {fileID: 0}
|
||||
iPhone58inLandscapeSplashScreen: {fileID: 0}
|
||||
iPadPortraitSplashScreen: {fileID: 0}
|
||||
iPadHighResPortraitSplashScreen: {fileID: 0}
|
||||
iPadLandscapeSplashScreen: {fileID: 0}
|
||||
iPadHighResLandscapeSplashScreen: {fileID: 0}
|
||||
appleTVSplashScreen: {fileID: 0}
|
||||
appleTVSplashScreen2x: {fileID: 0}
|
||||
tvOSSmallIconLayers: []
|
||||
tvOSSmallIconLayers2x: []
|
||||
tvOSLargeIconLayers: []
|
||||
tvOSLargeIconLayers2x: []
|
||||
tvOSTopShelfImageLayers: []
|
||||
tvOSTopShelfImageLayers2x: []
|
||||
tvOSTopShelfImageWideLayers: []
|
||||
tvOSTopShelfImageWideLayers2x: []
|
||||
iOSLaunchScreenType: 0
|
||||
iOSLaunchScreenPortrait: {fileID: 0}
|
||||
iOSLaunchScreenLandscape: {fileID: 0}
|
||||
iOSLaunchScreenBackgroundColor:
|
||||
serializedVersion: 2
|
||||
rgba: 0
|
||||
iOSLaunchScreenFillPct: 100
|
||||
iOSLaunchScreenSize: 100
|
||||
iOSLaunchScreenCustomXibPath:
|
||||
iOSLaunchScreeniPadType: 0
|
||||
iOSLaunchScreeniPadImage: {fileID: 0}
|
||||
iOSLaunchScreeniPadBackgroundColor:
|
||||
serializedVersion: 2
|
||||
rgba: 0
|
||||
iOSLaunchScreeniPadFillPct: 100
|
||||
iOSLaunchScreeniPadSize: 100
|
||||
iOSLaunchScreeniPadCustomXibPath:
|
||||
iOSUseLaunchScreenStoryboard: 0
|
||||
iOSLaunchScreenCustomStoryboardPath:
|
||||
iOSDeviceRequirements: []
|
||||
iOSURLSchemes: []
|
||||
iOSBackgroundModes: 0
|
||||
iOSMetalForceHardShadows: 0
|
||||
metalEditorSupport: 1
|
||||
metalAPIValidation: 1
|
||||
iOSRenderExtraFrameOnPause: 0
|
||||
appleDeveloperTeamID:
|
||||
iOSManualSigningProvisioningProfileID:
|
||||
tvOSManualSigningProvisioningProfileID:
|
||||
iOSManualSigningProvisioningProfileType: 0
|
||||
tvOSManualSigningProvisioningProfileType: 0
|
||||
appleEnableAutomaticSigning: 0
|
||||
iOSRequireARKit: 0
|
||||
appleEnableProMotion: 0
|
||||
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
|
||||
templatePackageId: com.unity.template.3d@1.0.3
|
||||
templateDefaultScene: Assets/Scenes/SampleScene.unity
|
||||
AndroidTargetArchitectures: 5
|
||||
AndroidSplashScreenScale: 0
|
||||
androidSplashScreen: {fileID: 0}
|
||||
AndroidKeystoreName:
|
||||
AndroidKeyaliasName:
|
||||
AndroidBuildApkPerCpuArchitecture: 0
|
||||
AndroidTVCompatibility: 1
|
||||
AndroidIsGame: 1
|
||||
AndroidEnableTango: 0
|
||||
androidEnableBanner: 1
|
||||
androidUseLowAccuracyLocation: 0
|
||||
m_AndroidBanners:
|
||||
- width: 320
|
||||
height: 180
|
||||
banner: {fileID: 0}
|
||||
androidGamepadSupportLevel: 0
|
||||
AndroidJvmMaxHeapSize: 4096
|
||||
resolutionDialogBanner: {fileID: 0}
|
||||
m_BuildTargetIcons: []
|
||||
m_BuildTargetPlatformIcons: []
|
||||
m_BuildTargetBatching:
|
||||
- m_BuildTarget: Standalone
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
- m_BuildTarget: tvOS
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
- m_BuildTarget: Android
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
- m_BuildTarget: iPhone
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
- m_BuildTarget: WebGL
|
||||
m_StaticBatching: 0
|
||||
m_DynamicBatching: 0
|
||||
m_BuildTargetGraphicsAPIs:
|
||||
- m_BuildTarget: AndroidPlayer
|
||||
m_APIs: 0b00000008000000
|
||||
m_Automatic: 1
|
||||
- m_BuildTarget: iOSSupport
|
||||
m_APIs: 10000000
|
||||
m_Automatic: 1
|
||||
- m_BuildTarget: AppleTVSupport
|
||||
m_APIs: 10000000
|
||||
m_Automatic: 0
|
||||
- m_BuildTarget: WebGLSupport
|
||||
m_APIs: 0b000000
|
||||
m_Automatic: 1
|
||||
m_BuildTargetVRSettings:
|
||||
- m_BuildTarget: Standalone
|
||||
m_Enabled: 0
|
||||
m_Devices:
|
||||
- Oculus
|
||||
- OpenVR
|
||||
m_BuildTargetEnableVuforiaSettings: []
|
||||
openGLRequireES31: 0
|
||||
openGLRequireES31AEP: 0
|
||||
m_TemplateCustomTags: {}
|
||||
mobileMTRendering:
|
||||
Android: 1
|
||||
iPhone: 1
|
||||
tvOS: 1
|
||||
m_BuildTargetGroupLightmapEncodingQuality: []
|
||||
m_BuildTargetGroupLightmapSettings: []
|
||||
playModeTestRunnerEnabled: 0
|
||||
runPlayModeTestAsEditModeTest: 0
|
||||
actionOnDotNetUnhandledException: 1
|
||||
enableInternalProfiler: 0
|
||||
logObjCUncaughtExceptions: 1
|
||||
enableCrashReportAPI: 0
|
||||
cameraUsageDescription:
|
||||
locationUsageDescription:
|
||||
microphoneUsageDescription:
|
||||
switchNetLibKey:
|
||||
switchSocketMemoryPoolSize: 6144
|
||||
switchSocketAllocatorPoolSize: 128
|
||||
switchSocketConcurrencyLimit: 14
|
||||
switchScreenResolutionBehavior: 2
|
||||
switchUseCPUProfiler: 0
|
||||
switchApplicationID: 0x01004b9000490000
|
||||
switchNSODependencies:
|
||||
switchTitleNames_0:
|
||||
switchTitleNames_1:
|
||||
switchTitleNames_2:
|
||||
switchTitleNames_3:
|
||||
switchTitleNames_4:
|
||||
switchTitleNames_5:
|
||||
switchTitleNames_6:
|
||||
switchTitleNames_7:
|
||||
switchTitleNames_8:
|
||||
switchTitleNames_9:
|
||||
switchTitleNames_10:
|
||||
switchTitleNames_11:
|
||||
switchTitleNames_12:
|
||||
switchTitleNames_13:
|
||||
switchTitleNames_14:
|
||||
switchPublisherNames_0:
|
||||
switchPublisherNames_1:
|
||||
switchPublisherNames_2:
|
||||
switchPublisherNames_3:
|
||||
switchPublisherNames_4:
|
||||
switchPublisherNames_5:
|
||||
switchPublisherNames_6:
|
||||
switchPublisherNames_7:
|
||||
switchPublisherNames_8:
|
||||
switchPublisherNames_9:
|
||||
switchPublisherNames_10:
|
||||
switchPublisherNames_11:
|
||||
switchPublisherNames_12:
|
||||
switchPublisherNames_13:
|
||||
switchPublisherNames_14:
|
||||
switchIcons_0: {fileID: 0}
|
||||
switchIcons_1: {fileID: 0}
|
||||
switchIcons_2: {fileID: 0}
|
||||
switchIcons_3: {fileID: 0}
|
||||
switchIcons_4: {fileID: 0}
|
||||
switchIcons_5: {fileID: 0}
|
||||
switchIcons_6: {fileID: 0}
|
||||
switchIcons_7: {fileID: 0}
|
||||
switchIcons_8: {fileID: 0}
|
||||
switchIcons_9: {fileID: 0}
|
||||
switchIcons_10: {fileID: 0}
|
||||
switchIcons_11: {fileID: 0}
|
||||
switchIcons_12: {fileID: 0}
|
||||
switchIcons_13: {fileID: 0}
|
||||
switchIcons_14: {fileID: 0}
|
||||
switchSmallIcons_0: {fileID: 0}
|
||||
switchSmallIcons_1: {fileID: 0}
|
||||
switchSmallIcons_2: {fileID: 0}
|
||||
switchSmallIcons_3: {fileID: 0}
|
||||
switchSmallIcons_4: {fileID: 0}
|
||||
switchSmallIcons_5: {fileID: 0}
|
||||
switchSmallIcons_6: {fileID: 0}
|
||||
switchSmallIcons_7: {fileID: 0}
|
||||
switchSmallIcons_8: {fileID: 0}
|
||||
switchSmallIcons_9: {fileID: 0}
|
||||
switchSmallIcons_10: {fileID: 0}
|
||||
switchSmallIcons_11: {fileID: 0}
|
||||
switchSmallIcons_12: {fileID: 0}
|
||||
switchSmallIcons_13: {fileID: 0}
|
||||
switchSmallIcons_14: {fileID: 0}
|
||||
switchManualHTML:
|
||||
switchAccessibleURLs:
|
||||
switchLegalInformation:
|
||||
switchMainThreadStackSize: 1048576
|
||||
switchPresenceGroupId:
|
||||
switchLogoHandling: 0
|
||||
switchReleaseVersion: 0
|
||||
switchDisplayVersion: 1.0.0
|
||||
switchStartupUserAccount: 0
|
||||
switchTouchScreenUsage: 0
|
||||
switchSupportedLanguagesMask: 0
|
||||
switchLogoType: 0
|
||||
switchApplicationErrorCodeCategory:
|
||||
switchUserAccountSaveDataSize: 0
|
||||
switchUserAccountSaveDataJournalSize: 0
|
||||
switchApplicationAttribute: 0
|
||||
switchCardSpecSize: -1
|
||||
switchCardSpecClock: -1
|
||||
switchRatingsMask: 0
|
||||
switchRatingsInt_0: 0
|
||||
switchRatingsInt_1: 0
|
||||
switchRatingsInt_2: 0
|
||||
switchRatingsInt_3: 0
|
||||
switchRatingsInt_4: 0
|
||||
switchRatingsInt_5: 0
|
||||
switchRatingsInt_6: 0
|
||||
switchRatingsInt_7: 0
|
||||
switchRatingsInt_8: 0
|
||||
switchRatingsInt_9: 0
|
||||
switchRatingsInt_10: 0
|
||||
switchRatingsInt_11: 0
|
||||
switchLocalCommunicationIds_0:
|
||||
switchLocalCommunicationIds_1:
|
||||
switchLocalCommunicationIds_2:
|
||||
switchLocalCommunicationIds_3:
|
||||
switchLocalCommunicationIds_4:
|
||||
switchLocalCommunicationIds_5:
|
||||
switchLocalCommunicationIds_6:
|
||||
switchLocalCommunicationIds_7:
|
||||
switchParentalControl: 0
|
||||
switchAllowsScreenshot: 1
|
||||
switchAllowsVideoCapturing: 1
|
||||
switchAllowsRuntimeAddOnContentInstall: 0
|
||||
switchDataLossConfirmation: 0
|
||||
switchSupportedNpadStyles: 3
|
||||
switchNativeFsCacheSize: 32
|
||||
switchIsHoldTypeHorizontal: 0
|
||||
switchSupportedNpadCount: 8
|
||||
switchSocketConfigEnabled: 0
|
||||
switchTcpInitialSendBufferSize: 32
|
||||
switchTcpInitialReceiveBufferSize: 64
|
||||
switchTcpAutoSendBufferSizeMax: 256
|
||||
switchTcpAutoReceiveBufferSizeMax: 256
|
||||
switchUdpSendBufferSize: 9
|
||||
switchUdpReceiveBufferSize: 42
|
||||
switchSocketBufferEfficiency: 4
|
||||
switchSocketInitializeEnabled: 1
|
||||
switchNetworkInterfaceManagerInitializeEnabled: 1
|
||||
switchPlayerConnectionEnabled: 1
|
||||
ps4NPAgeRating: 12
|
||||
ps4NPTitleSecret:
|
||||
ps4NPTrophyPackPath:
|
||||
ps4ParentalLevel: 11
|
||||
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
|
||||
ps4Category: 0
|
||||
ps4MasterVersion: 01.00
|
||||
ps4AppVersion: 01.00
|
||||
ps4AppType: 0
|
||||
ps4ParamSfxPath:
|
||||
ps4VideoOutPixelFormat: 0
|
||||
ps4VideoOutInitialWidth: 1920
|
||||
ps4VideoOutBaseModeInitialWidth: 1920
|
||||
ps4VideoOutReprojectionRate: 60
|
||||
ps4PronunciationXMLPath:
|
||||
ps4PronunciationSIGPath:
|
||||
ps4BackgroundImagePath:
|
||||
ps4StartupImagePath:
|
||||
ps4StartupImagesFolder:
|
||||
ps4IconImagesFolder:
|
||||
ps4SaveDataImagePath:
|
||||
ps4SdkOverride:
|
||||
ps4BGMPath:
|
||||
ps4ShareFilePath:
|
||||
ps4ShareOverlayImagePath:
|
||||
ps4PrivacyGuardImagePath:
|
||||
ps4NPtitleDatPath:
|
||||
ps4RemotePlayKeyAssignment: -1
|
||||
ps4RemotePlayKeyMappingDir:
|
||||
ps4PlayTogetherPlayerCount: 0
|
||||
ps4EnterButtonAssignment: 1
|
||||
ps4ApplicationParam1: 0
|
||||
ps4ApplicationParam2: 0
|
||||
ps4ApplicationParam3: 0
|
||||
ps4ApplicationParam4: 0
|
||||
ps4DownloadDataSize: 0
|
||||
ps4GarlicHeapSize: 2048
|
||||
ps4ProGarlicHeapSize: 2560
|
||||
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
|
||||
ps4pnSessions: 1
|
||||
ps4pnPresence: 1
|
||||
ps4pnFriends: 1
|
||||
ps4pnGameCustomData: 1
|
||||
playerPrefsSupport: 0
|
||||
enableApplicationExit: 0
|
||||
resetTempFolder: 1
|
||||
restrictedAudioUsageRights: 0
|
||||
ps4UseResolutionFallback: 0
|
||||
ps4ReprojectionSupport: 0
|
||||
ps4UseAudio3dBackend: 0
|
||||
ps4SocialScreenEnabled: 0
|
||||
ps4ScriptOptimizationLevel: 0
|
||||
ps4Audio3dVirtualSpeakerCount: 14
|
||||
ps4attribCpuUsage: 0
|
||||
ps4PatchPkgPath:
|
||||
ps4PatchLatestPkgPath:
|
||||
ps4PatchChangeinfoPath:
|
||||
ps4PatchDayOne: 0
|
||||
ps4attribUserManagement: 0
|
||||
ps4attribMoveSupport: 0
|
||||
ps4attrib3DSupport: 0
|
||||
ps4attribShareSupport: 0
|
||||
ps4attribExclusiveVR: 0
|
||||
ps4disableAutoHideSplash: 0
|
||||
ps4videoRecordingFeaturesUsed: 0
|
||||
ps4contentSearchFeaturesUsed: 0
|
||||
ps4attribEyeToEyeDistanceSettingVR: 0
|
||||
ps4IncludedModules: []
|
||||
monoEnv:
|
||||
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
||||
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
||||
spritePackerPolicy:
|
||||
webGLMemorySize: 256
|
||||
webGLExceptionSupport: 1
|
||||
webGLNameFilesAsHashes: 0
|
||||
webGLDataCaching: 1
|
||||
webGLDebugSymbols: 0
|
||||
webGLEmscriptenArgs:
|
||||
webGLModulesDirectory:
|
||||
webGLTemplate: APPLICATION:Default
|
||||
webGLAnalyzeBuildSize: 0
|
||||
webGLUseEmbeddedResources: 0
|
||||
webGLCompressionFormat: 1
|
||||
webGLLinkerTarget: 1
|
||||
webGLThreadsSupport: 0
|
||||
scriptingDefineSymbols: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend: {}
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
allowUnsafeCode: 0
|
||||
additionalIl2CppArgs:
|
||||
scriptingRuntimeVersion: 1
|
||||
apiCompatibilityLevelPerPlatform: {}
|
||||
m_RenderingPath: 1
|
||||
m_MobileRenderingPath: 1
|
||||
metroPackageName: Template_3D
|
||||
metroPackageVersion:
|
||||
metroCertificatePath:
|
||||
metroCertificatePassword:
|
||||
metroCertificateSubject:
|
||||
metroCertificateIssuer:
|
||||
metroCertificateNotAfter: 0000000000000000
|
||||
metroApplicationDescription: Template_3D
|
||||
wsaImages: {}
|
||||
metroTileShortName:
|
||||
metroTileShowName: 0
|
||||
metroMediumTileShowName: 0
|
||||
metroLargeTileShowName: 0
|
||||
metroWideTileShowName: 0
|
||||
metroSupportStreamingInstall: 0
|
||||
metroLastRequiredScene: 0
|
||||
metroDefaultTileSize: 1
|
||||
metroTileForegroundText: 2
|
||||
metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
|
||||
metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1}
|
||||
metroSplashScreenUseBackgroundColor: 0
|
||||
platformCapabilities: {}
|
||||
metroTargetDeviceFamilies: {}
|
||||
metroFTAName:
|
||||
metroFTAFileTypes: []
|
||||
metroProtocolName:
|
||||
metroCompilationOverrides: 1
|
||||
XboxOneProductId:
|
||||
XboxOneUpdateKey:
|
||||
XboxOneSandboxId:
|
||||
XboxOneContentId:
|
||||
XboxOneTitleId:
|
||||
XboxOneSCId:
|
||||
XboxOneGameOsOverridePath:
|
||||
XboxOnePackagingOverridePath:
|
||||
XboxOneAppManifestOverridePath:
|
||||
XboxOneVersion: 1.0.0.0
|
||||
XboxOnePackageEncryption: 0
|
||||
XboxOnePackageUpdateGranularity: 2
|
||||
XboxOneDescription:
|
||||
XboxOneLanguage:
|
||||
- enus
|
||||
XboxOneCapability: []
|
||||
XboxOneGameRating: {}
|
||||
XboxOneIsContentPackage: 0
|
||||
XboxOneEnableGPUVariability: 0
|
||||
XboxOneSockets: {}
|
||||
XboxOneSplashScreen: {fileID: 0}
|
||||
XboxOneAllowedProductIds: []
|
||||
XboxOnePersistentLocalStorageSize: 0
|
||||
XboxOneXTitleMemory: 8
|
||||
xboxOneScriptCompiler: 0
|
||||
XboxOneOverrideIdentityName:
|
||||
vrEditorSettings:
|
||||
daydream:
|
||||
daydreamIconForeground: {fileID: 0}
|
||||
daydreamIconBackground: {fileID: 0}
|
||||
cloudServicesEnabled:
|
||||
UNet: 1
|
||||
luminIcon:
|
||||
m_Name:
|
||||
m_ModelFolderPath:
|
||||
m_PortalFolderPath:
|
||||
luminCert:
|
||||
m_CertPath:
|
||||
m_PrivateKeyPath:
|
||||
luminIsChannelApp: 0
|
||||
luminVersion:
|
||||
m_VersionCode: 1
|
||||
m_VersionName:
|
||||
facebookSdkVersion: 7.9.4
|
||||
facebookAppId:
|
||||
facebookCookies: 1
|
||||
facebookLogging: 1
|
||||
facebookStatus: 1
|
||||
facebookXfbml: 0
|
||||
facebookFrictionlessRequests: 1
|
||||
apiCompatibilityLevel: 6
|
||||
cloudProjectId: e733115d-57cb-4cf1-a3ab-49a625ed264e
|
||||
framebufferDepthMemorylessMode: 0
|
||||
projectName: SampleProject1 (1)
|
||||
organizationId: tomas1856
|
||||
cloudEnabled: 0
|
||||
enableNativePlatformBackendsForNewInputSystem: 0
|
||||
disableOldInputManagerSupport: 0
|
||||
legacyClampBlendShapeWeights: 0
|
|
@ -0,0 +1 @@
|
|||
m_EditorVersion: 2018.3.0a12
|
|
@ -0,0 +1,190 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!47 &1
|
||||
QualitySettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 5
|
||||
m_CurrentQuality: 4
|
||||
m_QualitySettings:
|
||||
- serializedVersion: 2
|
||||
name: Very Low
|
||||
pixelLightCount: 0
|
||||
shadows: 0
|
||||
shadowResolution: 0
|
||||
shadowProjection: 1
|
||||
shadowCascades: 1
|
||||
shadowDistance: 15
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 1
|
||||
textureQuality: 1
|
||||
anisotropicTextures: 0
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 0
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 0
|
||||
vSyncCount: 0
|
||||
lodBias: 0.3
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 4
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Low
|
||||
pixelLightCount: 0
|
||||
shadows: 0
|
||||
shadowResolution: 0
|
||||
shadowProjection: 1
|
||||
shadowCascades: 1
|
||||
shadowDistance: 20
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 0
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 0
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 0
|
||||
vSyncCount: 0
|
||||
lodBias: 0.4
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 16
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Medium
|
||||
pixelLightCount: 1
|
||||
shadows: 1
|
||||
shadowResolution: 0
|
||||
shadowProjection: 1
|
||||
shadowCascades: 1
|
||||
shadowDistance: 20
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 0
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 0
|
||||
vSyncCount: 1
|
||||
lodBias: 0.7
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 64
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: High
|
||||
pixelLightCount: 2
|
||||
shadows: 2
|
||||
shadowResolution: 1
|
||||
shadowProjection: 1
|
||||
shadowCascades: 2
|
||||
shadowDistance: 40
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 2
|
||||
softParticles: 0
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
lodBias: 1
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 256
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Very High
|
||||
pixelLightCount: 3
|
||||
shadows: 2
|
||||
shadowResolution: 2
|
||||
shadowProjection: 1
|
||||
shadowCascades: 2
|
||||
shadowDistance: 40
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 4
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 4
|
||||
softParticles: 1
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
lodBias: 1.5
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 1024
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Ultra
|
||||
pixelLightCount: 4
|
||||
shadows: 2
|
||||
shadowResolution: 2
|
||||
shadowProjection: 1
|
||||
shadowCascades: 4
|
||||
shadowDistance: 150
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 4
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 4
|
||||
softParticles: 1
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
lodBias: 2
|
||||
maximumLODLevel: 0
|
||||
particleRaycastBudget: 4096
|
||||
asyncUploadTimeSlice: 2
|
||||
asyncUploadBufferSize: 4
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
excludedTargetPlatforms: []
|
||||
m_PerPlatformDefaultQuality:
|
||||
Android: 2
|
||||
Nintendo 3DS: 5
|
||||
Nintendo Switch: 5
|
||||
PS4: 5
|
||||
PSP2: 2
|
||||
Standalone: 5
|
||||
Tizen: 2
|
||||
WebGL: 3
|
||||
WiiU: 5
|
||||
Windows Store Apps: 5
|
||||
XboxOne: 5
|
||||
iPhone: 2
|
||||
tvOS: 2
|
|
@ -0,0 +1,43 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!78 &1
|
||||
TagManager:
|
||||
serializedVersion: 2
|
||||
tags: []
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
- Ignore Raycast
|
||||
-
|
||||
- Water
|
||||
- UI
|
||||
-
|
||||
-
|
||||
- PostProcessing
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
m_SortingLayers:
|
||||
- name: Default
|
||||
uniqueID: 0
|
||||
locked: 0
|
|
@ -0,0 +1,9 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!5 &1
|
||||
TimeManager:
|
||||
m_ObjectHideFlags: 0
|
||||
Fixed Timestep: 0.02
|
||||
Maximum Allowed Timestep: 0.1
|
||||
m_TimeScale: 1
|
||||
Maximum Particle Timestep: 0.03
|
|
@ -0,0 +1,33 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!310 &1
|
||||
UnityConnectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 1
|
||||
m_Enabled: 0
|
||||
m_TestMode: 0
|
||||
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
|
||||
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
|
||||
m_ConfigUrl: https://config.uca.cloud.unity3d.com
|
||||
m_TestInitMode: 0
|
||||
CrashReportingSettings:
|
||||
m_EventUrl: https://perf-events.cloud.unity3d.com
|
||||
m_Enabled: 0
|
||||
m_LogBufferSize: 10
|
||||
m_CaptureEditorExceptions: 1
|
||||
UnityPurchasingSettings:
|
||||
m_Enabled: 0
|
||||
m_TestMode: 0
|
||||
UnityAnalyticsSettings:
|
||||
m_Enabled: 0
|
||||
m_TestMode: 0
|
||||
UnityAdsSettings:
|
||||
m_Enabled: 0
|
||||
m_InitializeOnStartup: 1
|
||||
m_TestMode: 0
|
||||
m_IosGameId:
|
||||
m_AndroidGameId:
|
||||
m_GameIds: {}
|
||||
m_GameId:
|
||||
PerformanceReportingSettings:
|
||||
m_Enabled: 0
|
|
@ -0,0 +1,11 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!937362698 &1
|
||||
VFXManager:
|
||||
m_ObjectHideFlags: 0
|
||||
m_IndirectShader: {fileID: 0}
|
||||
m_CopyBufferShader: {fileID: 0}
|
||||
m_SortShader: {fileID: 0}
|
||||
m_RenderPipeSettingsPath:
|
||||
m_FixedTimeStep: 0.016666668
|
||||
m_MaxDeltaTime: 0.05
|
|
@ -0,0 +1,7 @@
|
|||
.DS_Store
|
||||
.npmrc
|
||||
.npmignore
|
||||
.gitignore
|
||||
QAReport.md
|
||||
QAReport.md.meta
|
||||
.gitlab-ci.yml
|
|
@ -0,0 +1,11 @@
|
|||
# Changelog
|
||||
All notable changes to this package will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.1.0] - 2017-MM-DD
|
||||
|
||||
### This is the first release of *Unity Package \<Your package name\>*.
|
||||
|
||||
*Short description of this release*
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4aa6affcdffea0e4eac4e6657bdd3fe6
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: facfa2af17868e344ab315ed77922365
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,462 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using UnityEditor.Utils;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal class AndroidLogcat
|
||||
{
|
||||
public enum Priority
|
||||
{
|
||||
Verbose,
|
||||
Debug,
|
||||
Info,
|
||||
Warn,
|
||||
Error,
|
||||
Fatal
|
||||
}
|
||||
|
||||
public struct LogEntry
|
||||
{
|
||||
public const string kTimeFormat = "yyyy/MM/dd HH:mm:ss.fff";
|
||||
public LogEntry(string msg)
|
||||
{
|
||||
message = msg;
|
||||
tag = string.Empty;
|
||||
dateTime = new DateTime();
|
||||
processId = -1;
|
||||
threadId = -1;
|
||||
priority = Priority.Info;
|
||||
this.message = this.message.TrimEnd(new[] { '\r', '\n' });
|
||||
}
|
||||
|
||||
public LogEntry(LogEntry entry)
|
||||
{
|
||||
this.dateTime = entry.dateTime;
|
||||
this.processId = entry.processId;
|
||||
this.threadId = entry.threadId;
|
||||
this.priority = entry.priority;
|
||||
this.tag = entry.tag;
|
||||
this.message = entry.message;
|
||||
}
|
||||
|
||||
public LogEntry(DateTime dateTime, int processId, int threadId, Priority priority, string tag, string message)
|
||||
{
|
||||
this.dateTime = dateTime;
|
||||
this.processId = processId;
|
||||
this.threadId = threadId;
|
||||
this.priority = priority;
|
||||
this.tag = tag ?? string.Empty;
|
||||
this.message = message ?? string.Empty;
|
||||
this.message = this.message.TrimEnd(new[] { '\r', '\n' });
|
||||
}
|
||||
|
||||
public DateTime dateTime;
|
||||
public int processId;
|
||||
public int threadId;
|
||||
public Priority priority;
|
||||
public string tag;
|
||||
public string message;
|
||||
|
||||
public override string ToString() => $"{dateTime.ToString(kTimeFormat)} {processId} {threadId} {priority} {tag}: {message}";
|
||||
}
|
||||
|
||||
protected struct BuildInfo
|
||||
{
|
||||
public string buildType;
|
||||
public string scriptingImplementation;
|
||||
public string cpu;
|
||||
}
|
||||
|
||||
private ADB adb;
|
||||
|
||||
public AndroidDevice device { get; }
|
||||
|
||||
public int packagePID { get; }
|
||||
|
||||
public Priority priority { get; }
|
||||
|
||||
public string filter { get; }
|
||||
|
||||
public string[] tags { get; }
|
||||
|
||||
public event Action<List<LogEntry>> LogEntriesAdded;
|
||||
|
||||
public event Action<string> DeviceDisconnected;
|
||||
|
||||
public event Action<string> DeviceConnected;
|
||||
|
||||
private Process m_LogcatProcess;
|
||||
|
||||
private List<string> m_CachedLogLines = new List<string>();
|
||||
|
||||
private string m_LastLogcatCommand = "";
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_LogcatProcess == null)
|
||||
return false;
|
||||
try
|
||||
{
|
||||
return !m_LogcatProcess.HasExited;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AndroidLogcat(ADB adb, AndroidDevice device, int packagePID, Priority priority, string filter, bool filterIsRegex, string[] tags)
|
||||
{
|
||||
this.adb = adb;
|
||||
this.device = device;
|
||||
this.packagePID = packagePID;
|
||||
this.priority = priority;
|
||||
this.filter = filterIsRegex ? filter : Regex.Escape(filter);
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
internal void Start()
|
||||
{
|
||||
// For logcat arguments and more details check https://developer.android.com/studio/command-line/logcat
|
||||
EditorApplication.update += OnUpdate;
|
||||
|
||||
m_LastLogcatCommand = LogcatArguments();
|
||||
m_LogcatProcess = StartADB(m_LastLogcatCommand);
|
||||
|
||||
m_LogcatProcess.BeginOutputReadLine();
|
||||
m_LogcatProcess.BeginErrorReadLine();
|
||||
|
||||
DeviceConnected?.Invoke(device.Id);
|
||||
}
|
||||
|
||||
private string LogcatArguments()
|
||||
{
|
||||
var filterArg = string.Empty;
|
||||
if (!string.IsNullOrEmpty(filter))
|
||||
{
|
||||
filterArg = $@" --regex ""{filter}""";
|
||||
}
|
||||
|
||||
var p = PriorityEnumToString(priority);
|
||||
var tagLine = tags.Length > 0 ? string.Join(" ", tags.Select(m => m + ":" + p + " ").ToArray()) : $"*:{p} ";
|
||||
|
||||
if (packagePID <= 0)
|
||||
return $"-s {device.Id} logcat -s -v year {tagLine}{filterArg}";
|
||||
else
|
||||
return $"-s {device.Id} logcat --pid={packagePID} -s -v year {tagLine}{filterArg}";
|
||||
}
|
||||
|
||||
internal void Stop()
|
||||
{
|
||||
m_CachedLogLines.Clear();
|
||||
m_BuildInfos.Clear();
|
||||
EditorApplication.update -= OnUpdate;
|
||||
if (m_LogcatProcess != null && !m_LogcatProcess.HasExited)
|
||||
{
|
||||
AndroidLogcatInternalLog.Log($"Stopping logcat (process id {m_LogcatProcess.Id})");
|
||||
// NOTE: DONT CALL CLOSE, or ADB process will stay alive all the time
|
||||
m_LogcatProcess.Kill();
|
||||
}
|
||||
|
||||
m_LogcatProcess = null;
|
||||
}
|
||||
|
||||
internal void Clear()
|
||||
{
|
||||
if (m_LogcatProcess != null)
|
||||
throw new InvalidOperationException("Cannot clear logcat when logcat process is alive.");
|
||||
|
||||
AndroidLogcatInternalLog.Log($"{adb.GetADBPath()} -s {device.Id} logcat -c");
|
||||
var adbOutput = adb.Run(new[] { "-s", device.Id, "logcat", "-c" }, null, "Failed to clear logcat.");
|
||||
AndroidLogcatInternalLog.Log(adbOutput);
|
||||
}
|
||||
|
||||
private Process StartADB(string arguments)
|
||||
{
|
||||
AndroidLogcatInternalLog.Log("{0} {1}", adb.GetADBPath(), arguments);
|
||||
Process logcatProcess = new Process();
|
||||
logcatProcess.StartInfo.FileName = adb.GetADBPath();
|
||||
logcatProcess.StartInfo.Arguments = arguments;
|
||||
logcatProcess.StartInfo.RedirectStandardError = true;
|
||||
logcatProcess.StartInfo.RedirectStandardOutput = true;
|
||||
logcatProcess.StartInfo.UseShellExecute = false;
|
||||
logcatProcess.StartInfo.CreateNoWindow = true;
|
||||
logcatProcess.OutputDataReceived += OutputDataReceived;
|
||||
logcatProcess.ErrorDataReceived += ErrorDataReceived;
|
||||
logcatProcess.Start();
|
||||
|
||||
return logcatProcess;
|
||||
}
|
||||
|
||||
void OnUpdate()
|
||||
{
|
||||
if (m_LogcatProcess == null)
|
||||
return;
|
||||
|
||||
if (m_LogcatProcess.HasExited)
|
||||
{
|
||||
Stop();
|
||||
DeviceDisconnected?.Invoke(device.Id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
List<LogEntry> entries = null;
|
||||
lock (m_CachedLogLines)
|
||||
{
|
||||
if (m_CachedLogLines.Count == 0)
|
||||
return;
|
||||
entries = m_CachedLogLines.Select(e =>
|
||||
{
|
||||
var m = m_LogCatEntryRegex.Match(e);
|
||||
return m.Success ? ParseLogEntry(m) : LogEntryParserErrorFor(e);
|
||||
}).ToList();
|
||||
m_CachedLogLines.Clear();
|
||||
}
|
||||
|
||||
if (entries == null)
|
||||
return;
|
||||
|
||||
ResolveStackTrace(entries);
|
||||
LogEntriesAdded(entries);
|
||||
}
|
||||
|
||||
private LogEntry LogEntryParserErrorFor(string msg)
|
||||
{
|
||||
return new LogEntry(msg);
|
||||
}
|
||||
|
||||
private LogEntry ParseLogEntry(Match m)
|
||||
{
|
||||
var entry = new LogEntry(
|
||||
DateTime.Parse(m.Groups["date"].Value),
|
||||
Int32.Parse(m.Groups["pid"].Value),
|
||||
Int32.Parse(m.Groups["tid"].Value),
|
||||
PriorityStringToEnum(m.Groups["priority"].Value),
|
||||
m.Groups["tag"].Value,
|
||||
m.Groups["msg"].Value);
|
||||
|
||||
if ((entry.priority == Priority.Info && entry.tag.GetHashCode() == kUnityHashCode && entry.message.StartsWith("Built from")) ||
|
||||
(entry.priority == Priority.Error && entry.tag.GetHashCode() == kCrashHashCode && entry.message.StartsWith("Build type")))
|
||||
{
|
||||
m_BuildInfos[entry.processId] = ParseBuildInfo(entry.message);
|
||||
}
|
||||
|
||||
if (entry.priority == Priority.Fatal && entry.tag.GetHashCode() == kDebugHashCode && entry.message.StartsWith("pid:"))
|
||||
{
|
||||
// Crash reported by Android for some pid, need to update buildInfo information for this new pid as well
|
||||
ParseCrashBuildInfo(entry.processId, entry.message);
|
||||
}
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
private Priority PriorityStringToEnum(string priority)
|
||||
{
|
||||
switch (priority)
|
||||
{
|
||||
case "V": return Priority.Verbose;
|
||||
case "D": return Priority.Debug;
|
||||
case "I": return Priority.Info;
|
||||
case "W": return Priority.Warn;
|
||||
case "E": return Priority.Error;
|
||||
case "F": return Priority.Fatal;
|
||||
|
||||
default:
|
||||
throw new InvalidOperationException($"Invalid `priority` ({priority}) in log entry.");
|
||||
}
|
||||
}
|
||||
|
||||
private BuildInfo ParseBuildInfo(string msg)
|
||||
{
|
||||
BuildInfo buildInfo;
|
||||
|
||||
var reg = new Regex(@"Build type '(.+)',\s+Scripting Backend '(.+)',\s+CPU '(.+)'");
|
||||
Match match = reg.Match(msg);
|
||||
|
||||
buildInfo.buildType = match.Groups[1].Value.ToLower();
|
||||
buildInfo.scriptingImplementation = match.Groups[2].Value.ToLower();
|
||||
buildInfo.cpu = match.Groups[3].Value.ToLower();
|
||||
return buildInfo;
|
||||
}
|
||||
|
||||
private void ParseCrashBuildInfo(int processId, string msg)
|
||||
{
|
||||
var reg = new Regex(@"pid: '(.+)'");
|
||||
Match match = reg.Match(msg);
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
int pid = Int32.Parse(match.Groups[1].Value);
|
||||
if (pid != processId && m_BuildInfos.ContainsKey(pid))
|
||||
m_BuildInfos[processId] = m_BuildInfos[pid];
|
||||
}
|
||||
}
|
||||
|
||||
public struct UnresolvedAddress
|
||||
{
|
||||
public int logEntryIndex;
|
||||
public string unresolvedAddress;
|
||||
};
|
||||
|
||||
private void ResolveStackTrace(List<LogEntry> entries)
|
||||
{
|
||||
var unresolvedAddresses = new Dictionary<KeyValuePair<BuildInfo, string>, List<UnresolvedAddress>>();
|
||||
|
||||
// Gather unresolved address if there are any
|
||||
for (int i = 0; i < entries.Count; i++)
|
||||
{
|
||||
var entry = entries[i];
|
||||
// Only process stacktraces from Error/Fatal priorities
|
||||
if (entry.priority != Priority.Error && entry.priority != Priority.Fatal)
|
||||
continue;
|
||||
|
||||
// Only process stacktraces if tag is "CRASH" or "DEBUG"
|
||||
if (entry.tag.GetHashCode() != kCrashHashCode && entry.tag.GetHashCode() != kDebugHashCode)
|
||||
continue;
|
||||
|
||||
BuildInfo buildInfo;
|
||||
// Unknown build info, that means we don't know where the symbols are located
|
||||
if (!m_BuildInfos.TryGetValue(entry.processId, out buildInfo))
|
||||
continue;
|
||||
|
||||
string address, libName;
|
||||
if (!ParseCrashMessage(entry.message, out address, out libName))
|
||||
continue;
|
||||
|
||||
List<UnresolvedAddress> addresses;
|
||||
var key = new KeyValuePair<BuildInfo, string>(buildInfo, libName);
|
||||
if (!unresolvedAddresses.TryGetValue(key, out addresses))
|
||||
unresolvedAddresses[key] = new List<UnresolvedAddress>();
|
||||
|
||||
unresolvedAddresses[key].Add(new UnresolvedAddress() { logEntryIndex = i, unresolvedAddress = address });
|
||||
}
|
||||
|
||||
var engineDirectory = BuildPipeline.GetPlaybackEngineDirectory(BuildTarget.Android, BuildOptions.None);
|
||||
|
||||
|
||||
// Resolve addresses
|
||||
foreach (var u in unresolvedAddresses)
|
||||
{
|
||||
var buildInfo = u.Key.Key;
|
||||
var libName = u.Key.Value;
|
||||
|
||||
var addresses = u.Value;
|
||||
string[] paths = { engineDirectory, "Variations", buildInfo.scriptingImplementation, buildInfo.buildType, "Symbols", buildInfo.cpu, libName };
|
||||
var libpath = CombinePaths(paths);
|
||||
|
||||
// For optimizations purposes, we batch addresses which belong to same library, so addr2line can be ran less
|
||||
try
|
||||
{
|
||||
var result = Addr2LineWrapper.Run(libpath, addresses.Select(m => m.unresolvedAddress));
|
||||
for (int i = 0; i < addresses.Count; i++)
|
||||
{
|
||||
var idx = addresses[i].logEntryIndex;
|
||||
var append = string.IsNullOrEmpty(result[i]) ? "(Not Resolved)" : result[i];
|
||||
entries[idx] = new LogEntry(entries[idx]) { message = ModifyLogEntry(entries[idx].message, append, false) };
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
for (int i = 0; i < addresses.Count; i++)
|
||||
{
|
||||
var idx = addresses[i].logEntryIndex;
|
||||
entries[idx] = new LogEntry(entries[idx]) { message = ModifyLogEntry(entries[idx].message, "(Addr2Line failure)", true) };
|
||||
var errorMessage = new StringBuilder();
|
||||
errorMessage.AppendLine("Addr2Line failure");
|
||||
errorMessage.AppendLine("Scripting Backend: " + buildInfo.scriptingImplementation);
|
||||
errorMessage.AppendLine("Build Type: " + buildInfo.buildType);
|
||||
errorMessage.AppendLine("CPU: " + buildInfo.cpu);
|
||||
errorMessage.AppendLine(ex.Message);
|
||||
UnityEngine.Debug.LogError(errorMessage.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string CombinePaths(string[] paths)
|
||||
{
|
||||
// Unity hasn't implemented System.IO.Path(string[]), we have to do it on our own.
|
||||
if (paths.Length == 0)
|
||||
return "";
|
||||
|
||||
string path = paths[0];
|
||||
for (int i = 1; i < paths.Length; ++i)
|
||||
path = System.IO.Path.Combine(path, paths[i]);
|
||||
return path;
|
||||
}
|
||||
|
||||
private bool ParseCrashMessage(string msg, out string address, out string libName)
|
||||
{
|
||||
var match = m_CrashMessageRegex.Match(msg);
|
||||
if (match.Success)
|
||||
{
|
||||
address = match.Groups[1].Value;
|
||||
libName = match.Groups[2].Value;
|
||||
return true;
|
||||
}
|
||||
address = null;
|
||||
libName = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
private string ModifyLogEntry(string msg, string appendText, bool keeplOriginalMessage)
|
||||
{
|
||||
if (keeplOriginalMessage)
|
||||
{
|
||||
return msg + " " + appendText;
|
||||
}
|
||||
else
|
||||
{
|
||||
var match = m_CrashMessageRegex.Match(msg);
|
||||
return match.Success ? match.Groups[0].Value + " " + appendText : msg + " " + appendText;
|
||||
}
|
||||
}
|
||||
|
||||
private string PriorityEnumToString(Priority priority)
|
||||
{
|
||||
return priority.ToString().Substring(0, 1);
|
||||
}
|
||||
|
||||
private void ErrorDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
if (e.Data == null)
|
||||
return;
|
||||
|
||||
lock (m_CachedLogLines)
|
||||
{
|
||||
m_CachedLogLines.Add(e.Data);
|
||||
}
|
||||
}
|
||||
|
||||
private void OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
// You can receive null string, when you put out USB cable out of PC and logcat connection is lost
|
||||
if (e.Data == null)
|
||||
return;
|
||||
|
||||
lock (m_CachedLogLines)
|
||||
{
|
||||
m_CachedLogLines.Add(e.Data);
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<int, BuildInfo> m_BuildInfos = new Dictionary<int, BuildInfo>();
|
||||
|
||||
private static Regex m_CrashMessageRegex = new Regex(@"^\s*#\d{2}\s*pc\s([a-fA-F0-9]{8}).*(libunity\.so|libmain\.so)", RegexOptions.Compiled);
|
||||
private static Regex m_LogCatEntryRegex = new Regex(@"(?<date>\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\.\d{3})\s+(?<pid>\d+)\s+(?<tid>\d+)\s+(?<priority>[VDIWEFS])\s+(?<tag>[^:\s]+)?\s*:\s(?<msg>.*)", RegexOptions.Compiled);
|
||||
|
||||
private static readonly int kUnityHashCode = "Unity".GetHashCode();
|
||||
private static readonly int kCrashHashCode = "CRASH".GetHashCode();
|
||||
private static readonly int kDebugHashCode = "DEBUG".GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 933bcfea4cf0d8149a11c15d53337fe8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,855 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal partial class AndroidLogcatConsoleWindow : EditorWindow, IHasCustomMenu
|
||||
{
|
||||
private int m_SelectedDeviceIndex;
|
||||
private string m_SelectedDeviceId;
|
||||
private string[] m_DeviceDetails = new string[0];
|
||||
private List<string> m_DeviceIds = new List<string>();
|
||||
private IDictionary<string, AndroidDevice> m_CachedDevices = new Dictionary<string, AndroidDevice>();
|
||||
private GUIContent kAutoRunText = new GUIContent(L10n.Tr("Auto Run"), L10n.Tr("Automatically launch logcat window during build & run."));
|
||||
private GUIContent kReconnect = new GUIContent(L10n.Tr("Reconnect"), L10n.Tr("Restart logcat process."));
|
||||
private GUIContent kRegexText = new GUIContent(L10n.Tr("Regex"), L10n.Tr("Treat contents in search field as regex expression."));
|
||||
private GUIContent kClearButtonText = new GUIContent(L10n.Tr("Clear"), L10n.Tr("Clears logcat by executing adb logcat -c."));
|
||||
private GUIContent kCaptureScreenText = new GUIContent(L10n.Tr("Capture Screen"), L10n.Tr("Capture the current screen on the device."));
|
||||
|
||||
private Rect m_IPWindowScreenRect;
|
||||
|
||||
private enum PackageType
|
||||
{
|
||||
None,
|
||||
DefinedFromPlayerSettings,
|
||||
TopActivityPackage
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
private class PackageInformation
|
||||
{
|
||||
public string name;
|
||||
public string displayName;
|
||||
public int processId;
|
||||
public bool exited;
|
||||
|
||||
public PackageInformation()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
name = string.Empty;
|
||||
displayName = string.Empty;
|
||||
processId = 0;
|
||||
exited = false;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private PackageInformation m_SelectedPackage = null;
|
||||
|
||||
// Note: Using List, so Unity can serialize it
|
||||
[SerializeField]
|
||||
private List<PackageInformation> m_Packages = new List<PackageInformation>();
|
||||
|
||||
[SerializeField]
|
||||
private AndroidLogcat.Priority m_SelectedPriority;
|
||||
|
||||
private string m_Filter = string.Empty;
|
||||
private bool m_FilterIsRegularExpression;
|
||||
|
||||
[SerializeField]
|
||||
private AndroidLogcatTagsControl m_TagControl;
|
||||
|
||||
private AndroidLogcat m_LogCat;
|
||||
private AndroidLogcatStatusBar m_StatusBar;
|
||||
private ADB m_Adb;
|
||||
private DateTime m_TimeOfLastDeviceListUpdate;
|
||||
private DateTime m_TimeOfLastAutoConnectUpdate;
|
||||
private DateTime m_TimeOfLastAutoConnectStart;
|
||||
|
||||
private List<AndroidLogcat.LogEntry> m_LogEntries = new List<AndroidLogcat.LogEntry>();
|
||||
|
||||
private const byte kSpace = 3;
|
||||
private const int kMillisecondsBetweenConsecutiveDeviceChecks = 1000;
|
||||
private const int kMillisecondsBetweenConsecutiveAutoConnectChecks = 1000;
|
||||
private const int kMillisecondsMaxAutoconnectTimeOut = 5000;
|
||||
|
||||
private bool m_AutoSelectPackage;
|
||||
private bool m_FinishedAutoselectingPackage;
|
||||
|
||||
private static string kAutoShowLogcatDuringBuildRun = "AutoShowLogcatDuringBuildRun";
|
||||
|
||||
public bool AutoSelectPackage
|
||||
{
|
||||
set
|
||||
{
|
||||
m_AutoSelectPackage = value;
|
||||
m_FinishedAutoselectingPackage = false;
|
||||
if (m_StatusBar != null && m_AutoSelectPackage)
|
||||
m_StatusBar.Message = "Waiting for '" + PlayerSettings.applicationIdentifier + "'";
|
||||
}
|
||||
|
||||
get
|
||||
{
|
||||
return m_AutoSelectPackage;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
AndroidLogcatInternalLog.Log("OnEnable");
|
||||
if (m_TagControl == null)
|
||||
RecreateTags();
|
||||
m_TagControl.TagSelectionChanged += TagSelectionChanged;
|
||||
|
||||
m_SelectedDeviceIndex = -1;
|
||||
m_SelectedDeviceId = null;
|
||||
|
||||
m_TimeOfLastAutoConnectStart = DateTime.Now;
|
||||
EditorApplication.update += Update;
|
||||
|
||||
m_FinishedAutoselectingPackage = false;
|
||||
AndroidLogcatInternalLog.Log("Package: {0}, Auto select: {1}", PlayerSettings.applicationIdentifier, m_AutoSelectPackage);
|
||||
|
||||
m_StatusBar = new AndroidLogcatStatusBar();
|
||||
if (m_AutoSelectPackage)
|
||||
m_StatusBar.Message = "Waiting for '" + PlayerSettings.applicationIdentifier + "'";
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
StopLogCat();
|
||||
EditorApplication.update -= Update;
|
||||
AndroidLogcatInternalLog.Log("OnDisable, Auto select: {0}", m_AutoSelectPackage);
|
||||
}
|
||||
|
||||
private void RemoveTag(string tag)
|
||||
{
|
||||
if (!m_TagControl.Remove(tag, true))
|
||||
return;
|
||||
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void AddTag(string tag)
|
||||
{
|
||||
if (!m_TagControl.Add(tag, true))
|
||||
return;
|
||||
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void RecreateTags()
|
||||
{
|
||||
m_TagControl = new AndroidLogcatTagsControl();
|
||||
|
||||
m_TagControl.Add("Unity");
|
||||
m_TagControl.Add("CRASH");
|
||||
}
|
||||
|
||||
private void TagSelectionChanged()
|
||||
{
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void ClearTags()
|
||||
{
|
||||
RecreateTags();
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (m_DeviceIds?.Count == 0)
|
||||
UpdateConnectedDevicesList(false);
|
||||
|
||||
if (m_DeviceIds.Count == 0)
|
||||
return;
|
||||
|
||||
if (m_AutoSelectPackage && !m_FinishedAutoselectingPackage)
|
||||
{
|
||||
if ((DateTime.Now - m_TimeOfLastAutoConnectUpdate).TotalMilliseconds < kMillisecondsBetweenConsecutiveAutoConnectChecks)
|
||||
return;
|
||||
m_TimeOfLastAutoConnectUpdate = DateTime.Now;
|
||||
|
||||
int projectApplicationPid = GetPIDFromPackageName(PlayerSettings.applicationIdentifier, m_DeviceIds[0]);
|
||||
|
||||
var package = CreatePackageInformation(PlayerSettings.applicationIdentifier, projectApplicationPid);
|
||||
if (package != null)
|
||||
{
|
||||
// Note: Don't call SelectPackage as that will reset m_AutoselectPackage
|
||||
m_SelectedPackage = package;
|
||||
RestartLogCat();
|
||||
m_FinishedAutoselectingPackage = true;
|
||||
UpdateStatusBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
var timeoutMS = (DateTime.Now - m_TimeOfLastAutoConnectStart).TotalMilliseconds;
|
||||
if (timeoutMS > kMillisecondsMaxAutoconnectTimeOut)
|
||||
{
|
||||
var msg = string.Format("Timeout {0} ms while waiting for '{1}' to launch.", timeoutMS, PlayerSettings.applicationIdentifier);
|
||||
UpdateStatusBar(msg);
|
||||
AndroidLogcatInternalLog.Log(msg);
|
||||
m_FinishedAutoselectingPackage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_SelectedDeviceId == null)
|
||||
{
|
||||
SetSelectedDeviceByIndex(0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDeviceDisconnected(string deviceId)
|
||||
{
|
||||
StopLogCat();
|
||||
var msg = $"Either adb.exe crashed or device disconnected (device id: {GetDeviceDetailsFor(deviceId)})";
|
||||
AndroidLogcatInternalLog.Log(msg);
|
||||
UpdateStatusBar(msg);
|
||||
var index = m_DeviceIds.IndexOf(deviceId);
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
m_DeviceIds.RemoveAt(index);
|
||||
ArrayUtility.RemoveAt(ref m_DeviceDetails, index);
|
||||
}
|
||||
|
||||
private void OnDeviceConnected(string deviceId)
|
||||
{
|
||||
UpdateStatusBar(string.Empty);
|
||||
}
|
||||
|
||||
private void OnNewLogEntryAdded(List<AndroidLogcat.LogEntry> entries)
|
||||
{
|
||||
m_LogEntries.AddRange(entries);
|
||||
Repaint();
|
||||
}
|
||||
|
||||
[MenuItem("Window/Analysis/Android Logcat &6")]
|
||||
internal static AndroidLogcatConsoleWindow ShowWindow()
|
||||
{
|
||||
return ShowNewOrExisting(false);
|
||||
}
|
||||
|
||||
internal static AndroidLogcatConsoleWindow ShowNewOrExisting(bool autoSelectPackage)
|
||||
{
|
||||
var wnd = GetWindow<AndroidLogcatConsoleWindow>();
|
||||
if (wnd == null)
|
||||
wnd = ScriptableObject.CreateInstance<AndroidLogcatConsoleWindow>();
|
||||
wnd.titleContent = new GUIContent("Android Logcat");
|
||||
wnd.AutoSelectPackage = autoSelectPackage;
|
||||
wnd.Show();
|
||||
wnd.Focus();
|
||||
|
||||
return wnd;
|
||||
}
|
||||
|
||||
internal static bool ShowDuringBuildRun
|
||||
{
|
||||
get
|
||||
{
|
||||
return EditorPrefs.GetBool(kAutoShowLogcatDuringBuildRun, true);
|
||||
}
|
||||
set
|
||||
{
|
||||
EditorPrefs.SetBool(kAutoShowLogcatDuringBuildRun, value);
|
||||
}
|
||||
}
|
||||
|
||||
internal void OnGUI()
|
||||
{
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.BeginHorizontal(AndroidLogcatStyles.toolbar);
|
||||
{
|
||||
ShowDuringBuildRun = GUILayout.Toggle(ShowDuringBuildRun, kAutoRunText, AndroidLogcatStyles.toolbarButton);
|
||||
|
||||
HandleSelectedDeviceField();
|
||||
|
||||
HandleSelectedPackage();
|
||||
|
||||
HandleSearchField();
|
||||
SetRegex(GUILayout.Toggle(m_FilterIsRegularExpression, kRegexText, AndroidLogcatStyles.toolbarButton));
|
||||
|
||||
GUILayout.Space(kSpace);
|
||||
|
||||
if (GUILayout.Button(kReconnect, AndroidLogcatStyles.toolbarButton))
|
||||
RestartLogCat();
|
||||
|
||||
GUILayout.Space(kSpace);
|
||||
if (GUILayout.Button(kClearButtonText, AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
ClearLogCat();
|
||||
Repaint();
|
||||
}
|
||||
|
||||
GUILayout.Space(kSpace);
|
||||
if (GUILayout.Button(kCaptureScreenText, AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
CaptureScreen();
|
||||
Repaint();
|
||||
}
|
||||
|
||||
// Don't erase, used for debugging purposes
|
||||
if (GUILayout.Button("Reload Me", AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
UnityEditorInternal.InternalEditorUtility.RequestScriptReload();
|
||||
}
|
||||
/*
|
||||
if (GUILayout.Button("AutoSelect " + m_AutoSelectPackage.ToString(), AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
m_AutoSelectPackage = true;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Stop logcat ", AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
StopLogCat();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Add Log lines", AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
for (int i = 0; i < 7000; i++)
|
||||
m_LogEntries.Add(new AndroidLogcat.LogEntry() { processId = i, message = "Dummy", tag = "sdsd" });
|
||||
Repaint();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Remove All Log Lines", AndroidLogcatStyles.toolbarButton))
|
||||
{
|
||||
m_LogEntries.RemoveAt(0);
|
||||
Repaint();
|
||||
}
|
||||
// Debugging purposes */
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
if (DoMessageView())
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
m_StatusBar?.DoGUI();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void DeviceSelection(object userData, string[] options, int selected)
|
||||
{
|
||||
if (selected == m_DeviceIds.Count)
|
||||
{
|
||||
AndroidLogcatIPWindow.Show(this, m_IPWindowScreenRect);
|
||||
return;
|
||||
}
|
||||
|
||||
SetSelectedDeviceByIndex(selected);
|
||||
}
|
||||
|
||||
public void ConnectDeviceByIPAddress(string ip)
|
||||
{
|
||||
IPAddress address;
|
||||
if (!IPAddress.TryParse(ip, out address))
|
||||
{
|
||||
Debug.LogError($"Invalid input ip address {ip}.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
|
||||
{
|
||||
// TODO: do we need to support IPV6?
|
||||
Debug.LogWarning("IPV6 is not supported for now");
|
||||
return;
|
||||
}
|
||||
|
||||
var cmd = $"connect {ip}";
|
||||
var errorMsg = $"Unable to connect to {ip}.";
|
||||
var outputMsg = GetCachedAdb().Run(new[] { cmd }, null, errorMsg);
|
||||
if (outputMsg.StartsWith(errorMsg))
|
||||
Debug.LogError(outputMsg);
|
||||
}
|
||||
|
||||
private void HandleSelectedDeviceField()
|
||||
{
|
||||
var currentSelectedDevice = m_SelectedDeviceIndex >= 0 && m_SelectedDeviceIndex < m_DeviceDetails.Length ? m_DeviceDetails[m_SelectedDeviceIndex] : "No device";
|
||||
GUILayout.Label(new GUIContent(currentSelectedDevice, "Select android device"), AndroidLogcatStyles.toolbarPopup);
|
||||
var rect = GUILayoutUtility.GetLastRect();
|
||||
if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
// Only update device list, when we select this UI item
|
||||
UpdateConnectedDevicesList(true);
|
||||
|
||||
var enabled = new List<bool>();
|
||||
var names = new List<string>();
|
||||
if (m_DeviceDetails.Length > 0)
|
||||
{
|
||||
names.AddRange(m_DeviceDetails);
|
||||
enabled = m_DeviceIds.Select(m => true).ToList();
|
||||
}
|
||||
|
||||
// Add <Enter IP> as last field to let user connect through wifi.
|
||||
names.Add("<Enter IP>");
|
||||
enabled.Add(true);
|
||||
|
||||
// Store the screen-space place that we should show the AndroidLogcatIPWindow.
|
||||
m_IPWindowScreenRect = GUIUtility.GUIToScreenRect(rect);
|
||||
|
||||
EditorUtility.DisplayCustomMenu(new Rect(rect.x, rect.yMax, 0, 0), names.ToArray(), enabled.ToArray(), new[] { m_SelectedDeviceIndex }, DeviceSelection, null);
|
||||
}
|
||||
|
||||
GUILayout.Space(kSpace);
|
||||
}
|
||||
|
||||
private void SelectPackage(PackageInformation newPackage)
|
||||
{
|
||||
if ((m_SelectedPackage == null && newPackage == null) ||
|
||||
(newPackage != null && m_SelectedPackage != null && newPackage.name == m_SelectedPackage.name && newPackage.processId == m_SelectedPackage.processId))
|
||||
return;
|
||||
|
||||
m_AutoSelectPackage = false;
|
||||
m_SelectedPackage = newPackage;
|
||||
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void PackageSelection(object userData, string[] options, int selected)
|
||||
{
|
||||
PackageInformation[] packages = (PackageInformation[])userData;
|
||||
SelectPackage(packages[selected]);
|
||||
}
|
||||
|
||||
private void HandleSelectedPackage()
|
||||
{
|
||||
// We always keep track the list of following packages:
|
||||
// * No Filter
|
||||
// * Package defined from player settings
|
||||
// * Package which is from top activity on phone and if it's not the one from player settings
|
||||
var displayName = m_SelectedPackage != null && m_SelectedPackage.processId != 0 ? m_SelectedPackage.displayName : "No Filter";
|
||||
GUILayout.Label(new GUIContent(displayName, "Select package name"), AndroidLogcatStyles.toolbarPopup);
|
||||
var rect = GUILayoutUtility.GetLastRect();
|
||||
if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
UpdateDebuggablePackages();
|
||||
|
||||
List<PackageInformation> packages = new List<PackageInformation>();
|
||||
|
||||
// Add No Filter "package"
|
||||
packages.Add(null);
|
||||
|
||||
packages.AddRange(m_Packages);
|
||||
|
||||
var appName = PlayerSettings.applicationIdentifier;
|
||||
packages.Sort(delegate(PackageInformation x, PackageInformation y)
|
||||
{
|
||||
if (x == null || (x.name == appName && !x.exited))
|
||||
return -1;
|
||||
if (y == null || (y.name == appName && !y.exited))
|
||||
return 1;
|
||||
if (x.exited && !y.exited)
|
||||
return 1;
|
||||
if (!x.exited && y.exited)
|
||||
return -1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
var names = new string[packages.Count];
|
||||
int selectedPackagedId = m_SelectedPackage == null || m_SelectedPackage.processId == 0 ? 0 : -1;
|
||||
for (int i = 0; i < packages.Count; i++)
|
||||
{
|
||||
names[i] = i == 0 ? "No Filter" : packages[i].displayName;
|
||||
|
||||
if (packages[i] != null && m_SelectedPackage != null && m_SelectedPackage.name == packages[i].name && m_SelectedPackage.processId == packages[i].processId)
|
||||
selectedPackagedId = i;
|
||||
}
|
||||
|
||||
EditorUtility.DisplayCustomMenu(
|
||||
new Rect(rect.x, rect.yMax, 0, 0),
|
||||
names,
|
||||
packages.Select(m => true).ToArray(),
|
||||
new[] { selectedPackagedId },
|
||||
PackageSelection, packages.ToArray());
|
||||
}
|
||||
|
||||
GUILayout.Space(kSpace);
|
||||
}
|
||||
|
||||
private void HandleSearchField()
|
||||
{
|
||||
const string kSearchFieldControlName = "LogcatSearch";
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
GUI.SetNextControlName(kSearchFieldControlName);
|
||||
var newFilter = EditorGUILayout.DelayedTextField(m_Filter, AndroidLogcatStyles.toolbarSearchField);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
SetFilter(newFilter);
|
||||
EditorGUI.FocusTextInControl(kSearchFieldControlName);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSelectedDeviceByIndex(int newDeviceIndex, bool force = false)
|
||||
{
|
||||
if (newDeviceIndex != m_SelectedDeviceIndex || force)
|
||||
{
|
||||
m_SelectedDeviceIndex = newDeviceIndex;
|
||||
m_SelectedDeviceId = m_DeviceIds[m_SelectedDeviceIndex];
|
||||
UpdateDebuggablePackages();
|
||||
RestartLogCat();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSelectedPriority(AndroidLogcat.Priority newPriority)
|
||||
{
|
||||
if (newPriority != m_SelectedPriority)
|
||||
{
|
||||
m_SelectedPriority = newPriority;
|
||||
RestartLogCat();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetFilter(string newFilter)
|
||||
{
|
||||
if (newFilter == m_Filter)
|
||||
return;
|
||||
|
||||
m_Filter = string.IsNullOrEmpty(newFilter) ? string.Empty : newFilter;
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void SetRegex(bool newValue)
|
||||
{
|
||||
if (newValue == m_FilterIsRegularExpression)
|
||||
return;
|
||||
|
||||
m_FilterIsRegularExpression = newValue;
|
||||
RestartLogCat();
|
||||
}
|
||||
|
||||
private void ConnectToDeviceId(string deviceId)
|
||||
{
|
||||
if (deviceId == null)
|
||||
return;
|
||||
|
||||
var adb = GetCachedAdb();
|
||||
var device = GetAndroidDeviceFromCache(adb, deviceId);
|
||||
|
||||
m_LogCat = new AndroidLogcat(adb, device, m_SelectedPackage == null ? 0 : m_SelectedPackage.processId, m_SelectedPriority, m_Filter, m_FilterIsRegularExpression, m_TagControl.GetSelectedTags());
|
||||
m_LogCat.LogEntriesAdded += OnNewLogEntryAdded;
|
||||
m_LogCat.DeviceDisconnected += OnDeviceDisconnected;
|
||||
m_LogCat.DeviceConnected += OnDeviceConnected;
|
||||
|
||||
m_LogCat.Start();
|
||||
}
|
||||
|
||||
private void UpdateConnectedDevicesList(bool immediate)
|
||||
{
|
||||
if ((DateTime.Now - m_TimeOfLastDeviceListUpdate).TotalMilliseconds < kMillisecondsBetweenConsecutiveDeviceChecks && !immediate)
|
||||
return;
|
||||
m_TimeOfLastDeviceListUpdate = DateTime.Now;
|
||||
|
||||
var adb = GetCachedAdb();
|
||||
|
||||
m_DeviceIds = RetrieveConnectDevicesIDs(adb);
|
||||
|
||||
// Ensure selected device does not change (due to a new device name taking the same index)
|
||||
if (m_SelectedDeviceId != null)
|
||||
{
|
||||
m_SelectedDeviceIndex = m_DeviceIds.IndexOf(m_SelectedDeviceId);
|
||||
}
|
||||
|
||||
var devicesDetails = new List<string>();
|
||||
foreach (var deviceId in m_DeviceIds)
|
||||
{
|
||||
devicesDetails.Add(RetrieveDeviceDetailsFor(adb, deviceId));
|
||||
}
|
||||
m_DeviceDetails = devicesDetails.ToArray();
|
||||
}
|
||||
|
||||
private void CheckIfPackageExited(PackageInformation package)
|
||||
{
|
||||
if (package != null &&
|
||||
package.processId > 0 &&
|
||||
!package.exited &&
|
||||
GetPIDFromPackageName(package.name) != package.processId)
|
||||
{
|
||||
m_SelectedPackage.exited = true;
|
||||
m_SelectedPackage.displayName += " [Exited]";
|
||||
}
|
||||
}
|
||||
|
||||
private PackageInformation CreatePackageInformation(string packageName, int pid)
|
||||
{
|
||||
if (pid <= 0)
|
||||
return null;
|
||||
|
||||
PackageInformation info;
|
||||
info = m_Packages.Where(p => p.processId == pid).FirstOrDefault();
|
||||
|
||||
if (info != null)
|
||||
return info;
|
||||
var newPackage = new PackageInformation()
|
||||
{
|
||||
name = packageName,
|
||||
displayName = $"{packageName} ({pid})",
|
||||
processId = pid
|
||||
};
|
||||
|
||||
m_Packages.Add(newPackage);
|
||||
return newPackage;
|
||||
}
|
||||
|
||||
private void UpdateDebuggablePackages()
|
||||
{
|
||||
CheckIfPackageExited(m_SelectedPackage);
|
||||
|
||||
int topActivityPid = 0;
|
||||
string topActivityPackageName = string.Empty;
|
||||
bool checkProjectPackage = true;
|
||||
if (GetCurrentPackage(ref topActivityPackageName, ref topActivityPid) && topActivityPid > 0)
|
||||
{
|
||||
CreatePackageInformation(topActivityPackageName, topActivityPid);
|
||||
|
||||
checkProjectPackage = topActivityPackageName != PlayerSettings.applicationIdentifier;
|
||||
}
|
||||
|
||||
if (checkProjectPackage)
|
||||
{
|
||||
int projectApplicationPid = GetPIDFromPackageName(PlayerSettings.applicationIdentifier);
|
||||
CreatePackageInformation(PlayerSettings.applicationIdentifier, projectApplicationPid);
|
||||
}
|
||||
}
|
||||
|
||||
private int GetPIDFromPackageName(string packageName, string deviceId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(deviceId))
|
||||
return -1;
|
||||
try
|
||||
{
|
||||
var adb = GetCachedAdb();
|
||||
var cmd = $"-s {deviceId} shell pidof {packageName}";
|
||||
AndroidLogcatInternalLog.Log($"{adb.GetADBPath()} {cmd}");
|
||||
var output = adb.Run(new[] { cmd }, null, "Unable to get the pid of the given packages.");
|
||||
AndroidLogcatInternalLog.Log(output);
|
||||
return int.Parse(output);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
private int GetPIDFromPackageName(string packageName)
|
||||
{
|
||||
return GetPIDFromPackageName(packageName, m_SelectedDeviceId);
|
||||
}
|
||||
|
||||
private bool GetCurrentPackage(ref string packageName, ref int packagePID)
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_SelectedDeviceId))
|
||||
return false;
|
||||
try
|
||||
{
|
||||
var adb = GetCachedAdb();
|
||||
var cmd = $"-s {m_SelectedDeviceId} shell \"dumpsys activity | grep top-activity\" ";
|
||||
AndroidLogcatInternalLog.Log($"{adb.GetADBPath()} {cmd}");
|
||||
var output = adb.Run(new[] { cmd }, null, "Unable to get the top activity.");
|
||||
AndroidLogcatInternalLog.Log(output);
|
||||
if (output.Length == 0)
|
||||
return false;
|
||||
|
||||
var reg = new Regex(@"(\d{2,})\:([^/]*)");
|
||||
Match match = reg.Match(output);
|
||||
if (!match.Success)
|
||||
{
|
||||
UnityEngine.Debug.Log("Match failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
packagePID = int.Parse(match.Groups[1].Value);
|
||||
packageName = match.Groups[2].Value;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<string> RetrieveConnectDevicesIDs(ADB adb)
|
||||
{
|
||||
var deviceIds = new List<string>();
|
||||
|
||||
AndroidLogcatInternalLog.Log("{0} devices", adb.GetADBPath());
|
||||
var adbOutput = adb.Run(new[] { "devices" }, null, "Unable to list connected devices. ");
|
||||
foreach (var line in adbOutput.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Select(line => line.Trim()))
|
||||
{
|
||||
AndroidLogcatInternalLog.Log(" " + line);
|
||||
if (line.EndsWith("device"))
|
||||
{
|
||||
var deviceId = line.Substring(0, line.IndexOf('\t'));
|
||||
deviceIds.Add(deviceId);
|
||||
}
|
||||
}
|
||||
|
||||
return deviceIds;
|
||||
}
|
||||
|
||||
private string GetDeviceDetailsFor(string deviceId)
|
||||
{
|
||||
var deviceIndex = m_DeviceIds.IndexOf(deviceId);
|
||||
System.Diagnostics.Debug.Assert(deviceIndex >= 0);
|
||||
|
||||
return m_DeviceDetails[deviceIndex];
|
||||
}
|
||||
|
||||
private string RetrieveDeviceDetailsFor(ADB adb, string deviceId)
|
||||
{
|
||||
var device = GetAndroidDeviceFromCache(adb, deviceId);
|
||||
if (device == null)
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
var manufacturer = device.Properties["ro.product.manufacturer"];
|
||||
var model = device.Properties["ro.product.model"];
|
||||
var release = device.Properties["ro.build.version.release"];
|
||||
var sdkVersion = device.Properties["ro.build.version.sdk"];
|
||||
|
||||
return $"{manufacturer} {model} (version: {release}, sdk: {sdkVersion}, id: {deviceId})";
|
||||
}
|
||||
|
||||
private AndroidDevice GetAndroidDeviceFromCache(ADB adb, string deviceId)
|
||||
{
|
||||
AndroidDevice device;
|
||||
if (m_CachedDevices.TryGetValue(deviceId, out device))
|
||||
{
|
||||
return device;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
device = new AndroidDevice(adb, deviceId);
|
||||
m_CachedDevices[deviceId] = device;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AndroidLogcatInternalLog.Log($"Exception caugth while trying to retrieve device details for device {deviceId}. This is harmless and device id will be used. Details\r\n:{ex}");
|
||||
// device will be null in this case (and it will not be added to the cache)
|
||||
}
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
private void RestartLogCat()
|
||||
{
|
||||
StopLogCat();
|
||||
|
||||
m_LogEntries.Clear();
|
||||
|
||||
ConnectToDeviceId(m_SelectedDeviceId);
|
||||
}
|
||||
|
||||
private void StopLogCat()
|
||||
{
|
||||
m_LogCat?.Stop();
|
||||
m_LogCat = null;
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
||||
private void ClearLogCat()
|
||||
{
|
||||
if (m_LogCat == null)
|
||||
return;
|
||||
|
||||
m_LogCat.Stop();
|
||||
m_LogEntries.Clear();
|
||||
m_SelectedIndices.Clear();
|
||||
m_LogCat.Clear();
|
||||
m_LogCat.Start();
|
||||
}
|
||||
|
||||
private void CaptureScreen()
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_SelectedDeviceId))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
const string screenshotPathOnDevice = "/sdcard/screen.png";
|
||||
var adb = GetCachedAdb();
|
||||
|
||||
// Capture the screen on the device.
|
||||
var cmd = $"-s {m_SelectedDeviceId} shell screencap {screenshotPathOnDevice}";
|
||||
var output = adb.Run(new[] {cmd}, null, $"Unable to capture the screen for device {m_SelectedDeviceId}.");
|
||||
if (output.StartsWith("Unable to capture the screen for device"))
|
||||
{
|
||||
Debug.LogError(output);
|
||||
return;
|
||||
}
|
||||
|
||||
// Pull screenshot from the device to temp folder.
|
||||
var filePath = Path.Combine(Path.GetTempPath(), "screen_" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".png");
|
||||
cmd = $"-s {m_SelectedDeviceId} pull {screenshotPathOnDevice} {filePath}";
|
||||
output = adb.Run(new[] { cmd }, null, $"Unable to pull the screenshot from device {m_SelectedDeviceId}.");
|
||||
if (output.StartsWith("Unable to pull the screenshot from device"))
|
||||
{
|
||||
Debug.LogError(output);
|
||||
return;
|
||||
}
|
||||
|
||||
AndroidLogcatScreenCaptureWindow.Show(filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AndroidLogcatInternalLog.Log($"Exception caugth while capturing screen on device {m_SelectedDeviceId}. Details\r\n:{ex}");
|
||||
}
|
||||
}
|
||||
|
||||
private ADB GetCachedAdb()
|
||||
{
|
||||
if (m_Adb == null)
|
||||
{
|
||||
AndroidJavaTools javaTools = AndroidJavaTools.GetInstance();
|
||||
AndroidSDKTools sdkTools = AndroidSDKTools.GetInstance(javaTools);
|
||||
m_Adb = new ADB(sdkTools);
|
||||
}
|
||||
|
||||
return m_Adb;
|
||||
}
|
||||
|
||||
public static void ShowInternalLog()
|
||||
{
|
||||
AndroidLogcatInternalLog.ShowLog(true);
|
||||
}
|
||||
|
||||
public void AddItemsToMenu(GenericMenu menu)
|
||||
{
|
||||
menu.AddItem(EditorGUIUtility.TrTextContent("Internal Log"), false, ShowInternalLog);
|
||||
}
|
||||
|
||||
public void UpdateStatusBar()
|
||||
{
|
||||
UpdateStatusBar(string.Empty);
|
||||
}
|
||||
|
||||
public void UpdateStatusBar(string message)
|
||||
{
|
||||
if (m_StatusBar == null)
|
||||
return;
|
||||
|
||||
m_StatusBar.Connected = m_LogCat != null && m_LogCat.IsConnected;
|
||||
m_StatusBar.Message = message;
|
||||
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac9b4e439aace6446a0642ca97e8f43b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal class AndroidLogcatIPWindow : EditorWindow
|
||||
{
|
||||
private AndroidLogcatConsoleWindow m_AndroidLogcatConsoleWindow = null;
|
||||
internal string m_IPString;
|
||||
internal bool m_DidFocus = false;
|
||||
|
||||
private const string kIPTextFieldId = "IPTextField";
|
||||
private const string kAndroidLogcatLastIP = "AndroidLogcatLastIP";
|
||||
|
||||
public static void Show(AndroidLogcatConsoleWindow window, Rect screenRect)
|
||||
{
|
||||
var rect = new Rect(screenRect.x, screenRect.yMax, 300, 50);
|
||||
AndroidLogcatIPWindow win = EditorWindow.GetWindowWithRect<AndroidLogcatIPWindow>(rect, true, "Enter Device IP");
|
||||
win.m_AndroidLogcatConsoleWindow = window;
|
||||
win.position = rect;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
m_IPString = EditorPrefs.GetString(kAndroidLogcatLastIP, "");
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
Event evt = Event.current;
|
||||
bool hitEnter = evt.type == EventType.KeyDown && (evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter);
|
||||
GUI.SetNextControlName(kIPTextFieldId);
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
{
|
||||
GUILayout.Space(5);
|
||||
m_IPString = EditorGUILayout.TextField(m_IPString);
|
||||
|
||||
if (!m_DidFocus)
|
||||
{
|
||||
m_DidFocus = true;
|
||||
EditorGUI.FocusTextInControl(kIPTextFieldId);
|
||||
}
|
||||
|
||||
GUI.enabled = !string.IsNullOrEmpty(m_IPString);
|
||||
if (GUILayout.Button("Connect") || hitEnter)
|
||||
{
|
||||
Close();
|
||||
EditorPrefs.SetString(kAndroidLogcatLastIP, m_IPString);
|
||||
m_AndroidLogcatConsoleWindow.ConnectDeviceByIPAddress(m_IPString);
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fb623b54e049ec1419ef67be65d224c4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,70 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal class AndroidLogcatInternalLog : EditorWindow
|
||||
{
|
||||
static AndroidLogcatInternalLog ms_Instance = null;
|
||||
static StringBuilder ms_LogEntries = new StringBuilder();
|
||||
|
||||
Vector2 m_ScrollPosition = Vector2.zero;
|
||||
public static void ShowLog(bool immediate)
|
||||
{
|
||||
if (ms_Instance == null)
|
||||
ms_Instance = ScriptableObject.CreateInstance<AndroidLogcatInternalLog>();
|
||||
|
||||
ms_Instance.titleContent = new GUIContent("Internal Log");
|
||||
ms_Instance.Show(immediate);
|
||||
ms_Instance.Focus();
|
||||
}
|
||||
|
||||
public static void Log(string message, params object[] args)
|
||||
{
|
||||
var timedMessage = DateTime.Now.ToString("HH:mm:ss.ffff") + " " + string.Format(message, args);
|
||||
ms_LogEntries.AppendLine(timedMessage);
|
||||
|
||||
Console.WriteLine("[Logcat] " + timedMessage);
|
||||
|
||||
if (ms_Instance != null)
|
||||
{
|
||||
ms_Instance.m_ScrollPosition = new Vector2(ms_Instance.m_ScrollPosition.x, float.MaxValue);
|
||||
ms_Instance.Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
ms_Instance = this;
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
var e = Event.current;
|
||||
if (e.type == EventType.MouseDown && e.button == 1)
|
||||
{
|
||||
var menuItems = new[] { "Copy All" };
|
||||
EditorUtility.DisplayCustomMenu(new Rect(e.mousePosition.x, e.mousePosition.y, 0, 0), menuItems.ToArray(), null, MenuSelection, null);
|
||||
}
|
||||
|
||||
m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, true, true);
|
||||
GUILayout.TextArea(ms_LogEntries.ToString(), GUILayout.ExpandHeight(true));
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void MenuSelection(object userData, string[] options, int selected)
|
||||
{
|
||||
switch (selected)
|
||||
{
|
||||
// Copy All
|
||||
case 0:
|
||||
EditorGUIUtility.systemCopyBuffer = ms_LogEntries.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fae640a08e7ea3e4cb8940a00df6cef8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,441 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Modules;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal partial class AndroidLogcatConsoleWindow
|
||||
{
|
||||
internal enum Column
|
||||
{
|
||||
Time,
|
||||
ProcessId,
|
||||
ThreadId,
|
||||
Priority,
|
||||
Tag,
|
||||
Message
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ColumnData
|
||||
{
|
||||
[NonSerialized]
|
||||
public GUIContent content;
|
||||
|
||||
public float width;
|
||||
|
||||
[NonSerialized]
|
||||
// Updated automatically when we're moving the splitter
|
||||
public Rect itemSize = Rect.zero;
|
||||
|
||||
[NonSerialized]
|
||||
public bool splitterDragging;
|
||||
|
||||
[NonSerialized]
|
||||
public float splitterDragStartMouseValue;
|
||||
|
||||
[NonSerialized]
|
||||
public float splitterDragStartWidthValue;
|
||||
|
||||
public bool enabled = true;
|
||||
}
|
||||
|
||||
private List<int> m_SelectedIndices = new List<int>();
|
||||
private Vector2 m_ScrollPosition = Vector2.zero;
|
||||
private float m_MaxLogEntryWidth = 0.0f;
|
||||
|
||||
[SerializeField]
|
||||
private ColumnData[] m_Columns = new ColumnData[]
|
||||
{
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Time", "Time when event occured"), width = 160.0f },
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Pid", "Process Id"), width = 50.0f },
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Tid", "Thread Id"), width = 50.0f },
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Priority", "Priority (Left click to select different priorities)"), width = 50.0f },
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Tag", "Tag (Left click to select different tags)"), width = 50.0f },
|
||||
new ColumnData() {content = EditorGUIUtility.TrTextContent("Message", ""), width = -1 },
|
||||
};
|
||||
|
||||
private bool m_Autoscroll = true;
|
||||
private float doubleClickStart = -1;
|
||||
|
||||
private bool DoSplitter(ColumnData data)
|
||||
{
|
||||
const float kSplitterWidth = 3.0f;
|
||||
var splitterRect = GUILayoutUtility.GetLastRect();
|
||||
splitterRect.x = splitterRect.x + splitterRect.width - kSplitterWidth * 0.5f;
|
||||
splitterRect.width = kSplitterWidth;
|
||||
|
||||
|
||||
EditorGUIUtility.AddCursorRect(splitterRect, MouseCursor.ResizeHorizontal);
|
||||
var e = Event.current;
|
||||
switch (e.type)
|
||||
{
|
||||
case EventType.MouseDown:
|
||||
if (splitterRect.Contains(e.mousePosition))
|
||||
{
|
||||
data.splitterDragging = true;
|
||||
data.splitterDragStartMouseValue = e.mousePosition.x;
|
||||
data.splitterDragStartWidthValue = data.width;
|
||||
e.Use();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case EventType.MouseDrag:
|
||||
case EventType.MouseUp:
|
||||
if (data.splitterDragging)
|
||||
{
|
||||
data.width = Mathf.Max(20.0f, data.splitterDragStartWidthValue + e.mousePosition.x - data.splitterDragStartMouseValue);
|
||||
|
||||
if (e.type == EventType.MouseUp)
|
||||
{
|
||||
data.splitterDragging = false;
|
||||
}
|
||||
e.Use();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool DoGUIHeader()
|
||||
{
|
||||
bool requestRepaint = false;
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
bool headerDrawn = false;
|
||||
bool lastHeaderDrawn = false;
|
||||
foreach (var c in Enum.GetValues(typeof(Column)))
|
||||
{
|
||||
var d = m_Columns[(int)c];
|
||||
if (!d.enabled)
|
||||
continue;
|
||||
if (d.width > 0.0f)
|
||||
{
|
||||
switch ((Column)c)
|
||||
{
|
||||
case Column.Priority:
|
||||
if (GUILayout.Button(d.content, AndroidLogcatStyles.columnHeader, GUILayout.Width(d.width)))
|
||||
{
|
||||
var priorities = (AndroidLogcat.Priority[])Enum.GetValues(typeof(AndroidLogcat.Priority));
|
||||
EditorUtility.DisplayCustomMenu(new Rect(Event.current.mousePosition, Vector2.zero), priorities.Select(m => new GUIContent(m.ToString())).ToArray(), (int)m_SelectedPriority, PrioritySelection, null);
|
||||
}
|
||||
break;
|
||||
case Column.Tag:
|
||||
if (GUILayout.Button(d.content, AndroidLogcatStyles.columnHeader, GUILayout.Width(d.width)))
|
||||
{
|
||||
m_TagControl.DoGUI(new Rect(Event.current.mousePosition, Vector2.zero));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
GUILayout.Label(d.content, AndroidLogcatStyles.columnHeader, GUILayout.Width(d.width));
|
||||
break;
|
||||
}
|
||||
d.itemSize = GUILayoutUtility.GetLastRect();
|
||||
requestRepaint |= DoSplitter(d);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(d.content, AndroidLogcatStyles.columnHeader);
|
||||
m_Columns[(int)c].itemSize = GUILayoutUtility.GetLastRect();
|
||||
// For last entry have a really big width, so all the message can fit
|
||||
m_Columns[(int)c].itemSize.width = 10000.0f;
|
||||
lastHeaderDrawn = true;
|
||||
}
|
||||
|
||||
d.itemSize.x = Mathf.Max(4.0f, d.itemSize.x);
|
||||
headerDrawn = true;
|
||||
}
|
||||
|
||||
if (!headerDrawn || !lastHeaderDrawn)
|
||||
GUILayout.Label(GUIContent.none, AndroidLogcatStyles.columnHeader);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
DoMouseEventsForHeaderToolbar(GUILayoutUtility.GetLastRect());
|
||||
return requestRepaint;
|
||||
}
|
||||
|
||||
private void MenuSelectionColumns(object userData, string[] options, int selected)
|
||||
{
|
||||
if (options[selected] == "Clear All")
|
||||
{
|
||||
foreach (var c in m_Columns)
|
||||
c.enabled = false;
|
||||
}
|
||||
else if (options[selected] == "Select All")
|
||||
{
|
||||
foreach (var c in m_Columns)
|
||||
c.enabled = true;
|
||||
}
|
||||
else if (selected < m_Columns.Length)
|
||||
m_Columns[selected].enabled = !m_Columns[selected].enabled;
|
||||
}
|
||||
|
||||
private void PrioritySelection(object userData, string[] options, int selected)
|
||||
{
|
||||
SetSelectedPriority((AndroidLogcat.Priority)selected);
|
||||
}
|
||||
|
||||
private void DoMouseEventsForHeaderToolbar(Rect headerRect)
|
||||
{
|
||||
var e = Event.current;
|
||||
if (e.type == EventType.MouseDown && headerRect.Contains(e.mousePosition))
|
||||
{
|
||||
switch (e.button)
|
||||
{
|
||||
case 1:
|
||||
var menuTexts = new List<string>();
|
||||
var menuSelected = new List<int>();
|
||||
for (int i = 0; i < m_Columns.Length; i++)
|
||||
{
|
||||
menuTexts.Add(((Column)i).ToString());
|
||||
if (m_Columns[i].enabled)
|
||||
menuSelected.Add(i);
|
||||
}
|
||||
|
||||
menuTexts.Add("");
|
||||
menuTexts.Add("Clear All");
|
||||
menuTexts.Add("Select All");
|
||||
e.Use();
|
||||
EditorUtility.DisplayCustomMenu(new Rect(e.mousePosition.x, e.mousePosition.y, 0, 0), menuTexts.ToArray(), menuSelected.ToArray(), MenuSelectionColumns, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DoLogEntryItem(Rect fullView, int index, Column column, string value, GUIStyle style)
|
||||
{
|
||||
if (!m_Columns[(int)column].enabled)
|
||||
return;
|
||||
var itemRect = m_Columns[(uint)column].itemSize;
|
||||
var rc = new Rect(itemRect.x, fullView.y + AndroidLogcatStyles.kLogEntryFixedHeight * index, itemRect.width, itemRect.height);
|
||||
style.Draw(rc, new GUIContent(value), 0);
|
||||
}
|
||||
|
||||
private bool DoGUIEntries()
|
||||
{
|
||||
bool requestRepaint = false;
|
||||
var e = Event.current;
|
||||
|
||||
var visibleWindowRect = GUILayoutUtility.GetRect(GUIContent.none, AndroidLogcatStyles.priorityDefaultStyle, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
|
||||
var totalWindowRect = visibleWindowRect;
|
||||
var maxVisibleItems = (int)(visibleWindowRect.height / AndroidLogcatStyles.kLogEntryFixedHeight);
|
||||
// Extra message count ensures that there's an empty space below when we scrolling all the way down
|
||||
// This way it's easier to see that there's no more messages
|
||||
const int kExtraMessageCount = 5;
|
||||
totalWindowRect.height = AndroidLogcatStyles.kLogEntryFixedHeight * (m_LogEntries.Count + kExtraMessageCount);
|
||||
totalWindowRect.width = Mathf.Max(totalWindowRect.width, m_MaxLogEntryWidth);
|
||||
|
||||
if (m_Autoscroll)
|
||||
m_ScrollPosition.y = totalWindowRect.height;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
m_ScrollPosition = GUI.BeginScrollView(visibleWindowRect, m_ScrollPosition, totalWindowRect);
|
||||
int startItem = (int)(m_ScrollPosition.y / totalWindowRect.height * (kExtraMessageCount + m_LogEntries.Count));
|
||||
|
||||
// Check if we need to enable autoscrolling
|
||||
if (EditorGUI.EndChangeCheck() || (e.type == EventType.ScrollWheel && e.delta.y > 0.0f))
|
||||
m_Autoscroll = startItem + maxVisibleItems - kExtraMessageCount >= m_LogEntries.Count;
|
||||
else if (e.type == EventType.ScrollWheel && e.delta.y < 0.0f)
|
||||
m_Autoscroll = false;
|
||||
|
||||
if (e.type == EventType.Repaint)
|
||||
{
|
||||
// Max Log Entry width is used for calculating horizontal scrollbar
|
||||
m_MaxLogEntryWidth = 0.0f;
|
||||
}
|
||||
|
||||
// Only draw items which can be visible on the screen
|
||||
// There can be thousands of log entries, drawing them all would kill performance
|
||||
for (int i = startItem; i - startItem < maxVisibleItems && i < m_LogEntries.Count; i++)
|
||||
{
|
||||
bool selected = m_SelectedIndices.Contains(i);
|
||||
var selectionRect = new Rect(visibleWindowRect.x, visibleWindowRect.y + AndroidLogcatStyles.kLogEntryFixedHeight * i, totalWindowRect.width, AndroidLogcatStyles.kFixedHeight);
|
||||
|
||||
if (e.type == EventType.Repaint)
|
||||
{
|
||||
var le = m_LogEntries[i];
|
||||
if (selected)
|
||||
AndroidLogcatStyles.background.Draw(selectionRect, false, false, true, false);
|
||||
var style = AndroidLogcatStyles.priorityStyles[(int)le.priority];
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.Time, le.dateTime.ToString(AndroidLogcat.LogEntry.kTimeFormat), style);
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.ProcessId, le.processId.ToString(), style);
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.ThreadId, le.threadId.ToString(), style);
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.Priority, le.priority.ToString(), style);
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.Tag, le.tag.ToString(), style);
|
||||
DoLogEntryItem(visibleWindowRect, i, Column.Message, le.message, style);
|
||||
|
||||
m_MaxLogEntryWidth = Mathf.Max(m_MaxLogEntryWidth,
|
||||
AndroidLogcatStyles.priorityDefaultStyle.CalcSize(new GUIContent(le.message)).x + m_Columns[(int)Column.Message].itemSize.x);
|
||||
}
|
||||
else
|
||||
{
|
||||
requestRepaint |= DoMouseEventsForLogEntry(selectionRect, i, selected);
|
||||
}
|
||||
}
|
||||
|
||||
GUI.EndScrollView();
|
||||
|
||||
return requestRepaint;
|
||||
}
|
||||
|
||||
private bool DoMouseEventsForLogEntry(Rect logEntryRect, int logEntryIndex, bool isLogEntrySelected)
|
||||
{
|
||||
bool requestRepaint = false;
|
||||
var e = Event.current;
|
||||
if (e.type == EventType.MouseDown && logEntryRect.Contains(e.mousePosition))
|
||||
{
|
||||
switch (e.button)
|
||||
{
|
||||
case 0:
|
||||
if ((e.modifiers & EventModifiers.Control) != 0)
|
||||
{
|
||||
if (m_SelectedIndices.Contains(logEntryIndex))
|
||||
m_SelectedIndices.Remove(logEntryIndex);
|
||||
else
|
||||
m_SelectedIndices.Add(logEntryIndex);
|
||||
}
|
||||
else if ((e.modifiers & EventModifiers.Shift) != 0)
|
||||
{
|
||||
int minValue = 0;
|
||||
foreach (var si in m_SelectedIndices)
|
||||
{
|
||||
if (si > logEntryIndex)
|
||||
break;
|
||||
minValue = si;
|
||||
}
|
||||
|
||||
for (int si = minValue; si <= logEntryIndex; si++)
|
||||
{
|
||||
if (m_SelectedIndices.Contains(si))
|
||||
continue;
|
||||
m_SelectedIndices.Add(si);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isLogEntrySelected && m_SelectedIndices.Count == 1)
|
||||
{
|
||||
if ((Time.realtimeSinceStartup - doubleClickStart) < 0.3f)
|
||||
TryToOpenFileFromLogEntry(m_LogEntries[logEntryIndex]);
|
||||
else
|
||||
m_SelectedIndices.Remove(logEntryIndex);
|
||||
doubleClickStart = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_SelectedIndices.Clear();
|
||||
m_SelectedIndices.Add(logEntryIndex);
|
||||
doubleClickStart = Time.realtimeSinceStartup;
|
||||
}
|
||||
}
|
||||
|
||||
m_SelectedIndices.Sort();
|
||||
e.Use();
|
||||
requestRepaint = true;
|
||||
break;
|
||||
case 1:
|
||||
var entries = new List<AndroidLogcat.LogEntry>();
|
||||
foreach (var si in m_SelectedIndices)
|
||||
{
|
||||
if (si > m_LogEntries.Count - 1)
|
||||
continue;
|
||||
entries.Add(m_LogEntries[si]);
|
||||
}
|
||||
var menuItems = new List<string>();
|
||||
menuItems.AddRange(new[] { "Copy", "Select All", "", "Save Selection" });
|
||||
|
||||
if (entries.Count > 0)
|
||||
{
|
||||
menuItems.Add("");
|
||||
menuItems.Add("Clear tags");
|
||||
menuItems.Add("Add tag '" + entries[0].tag + "'");
|
||||
menuItems.Add("Remove tag '" + entries[0].tag + "'");
|
||||
}
|
||||
|
||||
EditorUtility.DisplayCustomMenu(new Rect(e.mousePosition.x, e.mousePosition.y, 0, 0), menuItems.ToArray(), null, MenuSelection, entries.ToArray());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return requestRepaint;
|
||||
}
|
||||
|
||||
public bool DoMessageView()
|
||||
{
|
||||
return DoGUIHeader() | DoGUIEntries();
|
||||
}
|
||||
|
||||
private void MenuSelection(object userData, string[] options, int selected)
|
||||
{
|
||||
switch (selected)
|
||||
{
|
||||
// Copy
|
||||
case 0:
|
||||
var selectedLogEntries = (AndroidLogcat.LogEntry[])userData;
|
||||
var text = new StringBuilder();
|
||||
foreach (var l in selectedLogEntries)
|
||||
text.AppendLine(l.ToString());
|
||||
EditorGUIUtility.systemCopyBuffer = text.ToString();
|
||||
break;
|
||||
// Select All
|
||||
case 1:
|
||||
m_SelectedIndices.Clear();
|
||||
for (int si = 0; si < m_LogEntries.Count; si++)
|
||||
m_SelectedIndices.Add(si);
|
||||
break;
|
||||
// Save to File
|
||||
case 3:
|
||||
var allContents = new StringBuilder();
|
||||
foreach (var l in m_LogEntries)
|
||||
{
|
||||
var entry = string.Empty;
|
||||
for (int i = 0; i < m_Columns.Length; i++)
|
||||
{
|
||||
if (!m_Columns[i].enabled)
|
||||
continue;
|
||||
if (entry.Length > 0)
|
||||
entry += " ";
|
||||
switch ((Column)i)
|
||||
{
|
||||
case Column.Time: entry += l.dateTime.ToString(AndroidLogcat.LogEntry.kTimeFormat); break;
|
||||
case Column.ProcessId: entry += l.processId; break;
|
||||
case Column.ThreadId: entry += l.threadId; break;
|
||||
case Column.Priority: entry += l.priority; break;
|
||||
case Column.Tag: entry += l.tag; break;
|
||||
case Column.Message: entry += l.message; break;
|
||||
}
|
||||
}
|
||||
allContents.AppendLine(entry);
|
||||
}
|
||||
var filePath = EditorUtility.SaveFilePanel("Save logcat", "", PlayerSettings.applicationIdentifier + "-logcat", "txt");
|
||||
if (!string.IsNullOrEmpty(filePath))
|
||||
File.WriteAllText(filePath, allContents.ToString());
|
||||
break;
|
||||
// Clear tags
|
||||
case 5:
|
||||
ClearTags();
|
||||
break;
|
||||
// Add tag
|
||||
case 6:
|
||||
AddTag(((AndroidLogcat.LogEntry[])userData)[0].tag);
|
||||
break;
|
||||
// Remove tag
|
||||
case 7:
|
||||
RemoveTag(((AndroidLogcat.LogEntry[])userData)[0].tag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void TryToOpenFileFromLogEntry(AndroidLogcat.LogEntry entry)
|
||||
{
|
||||
Regex re = new Regex(@"at.*\s([^\s]+):(\d+)");
|
||||
var match = re.Match(entry.message);
|
||||
if (match.Success)
|
||||
UnityEditorInternal.InternalEditorUtility.TryOpenErrorFileFromConsole(match.Groups[1].Value, Int32.Parse(match.Groups[2].Value));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e821f28e88c783644ae24ff85c4eb63a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal class AndroidLogcatScreenCaptureWindow : EditorWindow
|
||||
{
|
||||
private string m_ImagePath;
|
||||
private Texture2D m_ImageTexture = null;
|
||||
bool didLoad = false;
|
||||
private const int buttonAreaHeight = 30;
|
||||
private const int saveButtonWidth = 60;
|
||||
|
||||
public static void Show(string imagePath)
|
||||
{
|
||||
AndroidLogcatScreenCaptureWindow win = EditorWindow.GetWindow<AndroidLogcatScreenCaptureWindow>("Device Screen Capture");
|
||||
win.m_ImagePath = imagePath;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
if (!didLoad)
|
||||
{
|
||||
LoadImage();
|
||||
didLoad = true;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
GUILayout.Space(5);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button("Save", GUILayout.Width(saveButtonWidth)))
|
||||
{
|
||||
var path = EditorUtility.SaveFilePanel("Save Screen Capture", "", Path.GetFileName(m_ImagePath), "png");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Copy(m_ImagePath, path);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.LogError($"Failed to save to '{path}'.");
|
||||
}
|
||||
}
|
||||
}
|
||||
GUILayout.Space(20);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(10);
|
||||
if (m_ImageTexture != null)
|
||||
{
|
||||
Rect rect = new Rect(0, buttonAreaHeight, position.width, position.height);
|
||||
GUI.DrawTexture(rect, m_ImageTexture, ScaleMode.ScaleToFit);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void LoadImage()
|
||||
{
|
||||
if (!File.Exists(m_ImagePath))
|
||||
return;
|
||||
|
||||
byte[] imageData;
|
||||
imageData = File.ReadAllBytes(m_ImagePath);
|
||||
|
||||
m_ImageTexture = new Texture2D(2, 2); // The size will be replaced by LoadImage().
|
||||
if (!m_ImageTexture.LoadImage(imageData))
|
||||
return;
|
||||
|
||||
maxSize = new Vector2(Math.Max(m_ImageTexture.width, position.width), m_ImageTexture.height + buttonAreaHeight);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ee8b0cffe812df7499b537935b553dcc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Utils;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
internal class AndroidLogcatStatusBar
|
||||
{
|
||||
public string Message { set; get; }
|
||||
|
||||
public bool Connected { set; get; }
|
||||
|
||||
public AndroidLogcatStatusBar()
|
||||
{
|
||||
Message = String.Empty;
|
||||
}
|
||||
|
||||
public void DoGUI()
|
||||
{
|
||||
var rc = GUILayoutUtility.GetRect(GUIContent.none, AndroidLogcatStyles.statusLabel, GUILayout.ExpandWidth(true));
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
AndroidLogcatStyles.statusBarBackground.Draw(rc, false, true, false, false);
|
||||
}
|
||||
rc.x += 10.0f;
|
||||
var msg = Connected ? "<color=#00FF00FF><b>Connected</b></color>" : "<color=#FF0000FF><b>Disconnected</b></color>";
|
||||
|
||||
if (!string.IsNullOrEmpty(Message))
|
||||
{
|
||||
msg += " : ";
|
||||
msg += Message;
|
||||
}
|
||||
|
||||
GUI.Label(rc, msg, AndroidLogcatStyles.statusLabel);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4441015e304c5d948b0a02911ed4c6a7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Modules;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
static class AndroidLogcatStyles
|
||||
{
|
||||
public const int kFontSize = 10;
|
||||
public const int kFixedHeight = kFontSize + 9;
|
||||
public static GUIStyle toolbar = new GUIStyle(EditorStyles.toolbar) { fontSize = kFontSize, fixedHeight = kFixedHeight};
|
||||
public static GUIStyle toolbarButton = new GUIStyle(EditorStyles.toolbarButton) { fontSize = kFontSize, fixedHeight = kFixedHeight };
|
||||
public static GUIStyle toolbarPopup = new GUIStyle(EditorStyles.toolbarPopup) { fontSize = kFontSize, fixedHeight = kFixedHeight };
|
||||
public static GUIStyle toolbarSearchField = new GUIStyle(EditorStyles.toolbarSearchField) { fontSize = kFontSize, fixedHeight = kFixedHeight };
|
||||
|
||||
public static GUIStyle toolbarLabel = new GUIStyle(EditorStyles.miniLabel) { fontSize = kFontSize, padding = new RectOffset(5, 5, 0, 0) };
|
||||
public static GUIStyle button = new GUIStyle(EditorStyles.miniButton) { fontSize = kFontSize};
|
||||
|
||||
public static GUIStyle columnHeader = new GUIStyle("OL TITLE");
|
||||
|
||||
public const int kLogEntryFontSize = 10;
|
||||
public const int kLogEntryFixedHeight = kLogEntryFontSize + 5;
|
||||
public static GUIStyle background = new GUIStyle("CN EntryBackodd") { fixedHeight = kLogEntryFixedHeight };
|
||||
public static GUIStyle priorityDefaultStyle = new GUIStyle(EditorStyles.miniLabel) { fontSize = kLogEntryFontSize, fixedHeight = kLogEntryFixedHeight, padding = new RectOffset(0, 0, 1, 1) };
|
||||
public static GUIStyle[] priorityStyles = new[]
|
||||
{
|
||||
new GUIStyle(priorityDefaultStyle) {},
|
||||
new GUIStyle(priorityDefaultStyle) {},
|
||||
new GUIStyle(priorityDefaultStyle) {},
|
||||
new GUIStyle(priorityDefaultStyle) { normal = new GUIStyleState() { textColor = Color.yellow } },
|
||||
new GUIStyle(priorityDefaultStyle) { normal = new GUIStyleState() { textColor = Color.red } },
|
||||
new GUIStyle(priorityDefaultStyle) { normal = new GUIStyleState() { textColor = Color.red } },
|
||||
};
|
||||
|
||||
public const int kStatusBarFontSize = 13;
|
||||
public const int kLStatusBarFixedHeight = kStatusBarFontSize + 5;
|
||||
public static GUIStyle statusBarBackground = new GUIStyle("AppToolbar") { fixedHeight = kStatusBarFontSize };
|
||||
public static GUIStyle statusLabel = new GUIStyle("AppToolbar") { fontSize = kStatusBarFontSize, fixedHeight = kLStatusBarFixedHeight, richText = true };
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7f76fd784bcf4c840b2d7ae85313e706
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,137 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Android
|
||||
{
|
||||
[Serializable]
|
||||
internal class AndroidLogcatTagsControl
|
||||
{
|
||||
[SerializeField]
|
||||
private List<string> m_TagNames = new List<string>(new[] { "Filter by all tags", "Show logs with any tag", null });
|
||||
|
||||
[SerializeField]
|
||||
private List<int> m_SelectedTags = new List<int>(new[] { kInvalidTagIndex, kAnyTagIndex, kInvalidTagIndex });
|
||||
|
||||
private const byte kFilterByAllTags = 0;
|
||||
private const byte kAnyTagIndex = 1;
|
||||
private const byte kIndexOfFirstValidTag = 3; // Skipt the first 2 options + separator
|
||||
private const int kInvalidTagIndex = Int32.MaxValue;
|
||||
|
||||
public event Action TagSelectionChanged;
|
||||
|
||||
public AndroidLogcatTagsControl()
|
||||
{
|
||||
}
|
||||
|
||||
public bool Add(string tag, bool selected = false)
|
||||
{
|
||||
if (m_TagNames.Where(tagName => tagName == tag).FirstOrDefault() != null)
|
||||
return false;
|
||||
|
||||
// Tag names
|
||||
m_TagNames.Add(tag);
|
||||
|
||||
// Indexes
|
||||
m_SelectedTags.Add(kInvalidTagIndex);
|
||||
|
||||
if (selected)
|
||||
TagSelected(null, null, m_SelectedTags.Count - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Remove(string tag, bool updateSelection = false)
|
||||
{
|
||||
if (m_TagNames.Where(tagName => tagName == tag).FirstOrDefault() != null)
|
||||
return false;
|
||||
|
||||
// Tag names
|
||||
var newTags = new List<string>(m_TagNames);
|
||||
var tagIndex = newTags.IndexOf(tag);
|
||||
|
||||
if (tagIndex < kIndexOfFirstValidTag)
|
||||
return false;
|
||||
|
||||
if (updateSelection && IsSelected(tagIndex))
|
||||
{
|
||||
TagSelected(null, null, tagIndex); // unselect it
|
||||
TagSelected(null, null, kAnyTagIndex); // Select *Any Tag*
|
||||
}
|
||||
|
||||
newTags.Remove(tag);
|
||||
|
||||
m_TagNames = newTags;
|
||||
|
||||
// Selected indexes
|
||||
m_SelectedTags.RemoveAt(tagIndex);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public string[] GetSelectedTags()
|
||||
{
|
||||
if (m_SelectedTags[kAnyTagIndex] == kAnyTagIndex)
|
||||
return new string[0];
|
||||
|
||||
var selectedTagNames = new List<string>(m_SelectedTags.Count);
|
||||
for (int i = 0; i < m_SelectedTags.Count; i++)
|
||||
{
|
||||
if (m_SelectedTags[i] == i)
|
||||
{
|
||||
selectedTagNames.Add(m_TagNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return selectedTagNames.ToArray();
|
||||
}
|
||||
|
||||
public void DoGUI(Rect rect)
|
||||
{
|
||||
var separators = m_TagNames.Select(t => t == null).ToArray();
|
||||
EditorUtility.DisplayCustomMenuWithSeparators(new Rect(rect.x, rect.y + rect.height, 0, 0), m_TagNames.ToArray(), separators, m_SelectedTags.ToArray(), TagSelected, null);
|
||||
}
|
||||
|
||||
private void TagSelected(object userData, string[] options, int selected)
|
||||
{
|
||||
if (selected == kFilterByAllTags)
|
||||
{
|
||||
// unselect *any tag* and select all of others...s
|
||||
UpdateTagFilterBasedOnAnyTagOption(false);
|
||||
}
|
||||
else if (selected == kAnyTagIndex)
|
||||
{
|
||||
if (m_SelectedTags[kAnyTagIndex] == kInvalidTagIndex)
|
||||
{
|
||||
// Select *any tag*, unselect all others
|
||||
UpdateTagFilterBasedOnAnyTagOption(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unselect *any tag*, select all others...
|
||||
UpdateTagFilterBasedOnAnyTagOption(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_SelectedTags[selected] = m_SelectedTags[selected] == kInvalidTagIndex ? selected : kInvalidTagIndex;
|
||||
m_SelectedTags[kAnyTagIndex] = kInvalidTagIndex;
|
||||
}
|
||||
|
||||
TagSelectionChanged?.Invoke();
|
||||
}
|
||||
|
||||
private void UpdateTagFilterBasedOnAnyTagOption(bool selectAnyTagEntry)
|
||||
{
|
||||
for (int i = kIndexOfFirstValidTag; i < m_SelectedTags.Count; i++)
|
||||
m_SelectedTags[i] = selectAnyTagEntry ? kInvalidTagIndex : i;
|
||||
|
||||
m_SelectedTags[kAnyTagIndex] = selectAnyTagEntry ? kAnyTagIndex : kInvalidTagIndex;
|
||||
}
|
||||
|
||||
private bool IsSelected(int index)
|
||||
{
|
||||
return m_SelectedTags[index] == index;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e34e115f989d0f94ebc5ce200df3dae2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "Unity.Mobile.AndroidLogcat.Editor",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 36c7d68b29d1acc459c26ef19cb84b25
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "com.unity.mobile.android-logcat",
|
||||
"description": "Android Logcat window.",
|
||||
"version": "0.1.0-preview",
|
||||
"unity": "2019.1",
|
||||
"displayName": "Android Logcat "
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 77f50a85a97ec4c41ba7be166c574498
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Загрузка…
Ссылка в новой задаче