物体3D展示功能
This commit is contained in:
parent
a45ed50fd9
commit
bb0bba3ed4
1155
Assets/Art/UIPrefab/UI3DObjShow.prefab
Normal file
1155
Assets/Art/UIPrefab/UI3DObjShow.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Art/UIPrefab/UI3DObjShow.prefab.meta
Normal file
7
Assets/Art/UIPrefab/UI3DObjShow.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e73fb7e22f2e74458d624bed84eac4a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName: ui3dobjshow_prefab
|
||||
assetBundleVariant:
|
||||
8
Assets/RenderTexture.meta
Normal file
8
Assets/RenderTexture.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d6f9f381c2b42547b9713d47cc8fa87
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
40
Assets/RenderTexture/3DShow.renderTexture
Normal file
40
Assets/RenderTexture/3DShow.renderTexture
Normal file
@ -0,0 +1,40 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!84 &8400000
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 3DShow
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 1280
|
||||
m_Height: 720
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_EnableRandomWrite: 0
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
||||
8
Assets/RenderTexture/3DShow.renderTexture.meta
Normal file
8
Assets/RenderTexture/3DShow.renderTexture.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 187fba8368491cb428c8cbd324fa9bb4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -735,6 +735,152 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &2114935602
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2114935606}
|
||||
- component: {fileID: 2114935605}
|
||||
- component: {fileID: 2114935603}
|
||||
- component: {fileID: 2114935607}
|
||||
m_Layer: 0
|
||||
m_Name: 3DShowCamera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2114935603
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2114935602}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
quality: 3
|
||||
frameInfluence: 0.1
|
||||
jitterScale: 1
|
||||
mipBias: 0
|
||||
varianceClampScale: 0.9
|
||||
contrastAdaptiveSharpening: 0
|
||||
--- !u!20 &2114935605
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2114935602}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 8400000, guid: 187fba8368491cb428c8cbd324fa9bb4, type: 2}
|
||||
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 &2114935606
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2114935602}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2114935607
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2114935602}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 35f672d48a4ed2349bb724d185d6a153, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target: {fileID: 0}
|
||||
rotateSpeed: 10
|
||||
moveSpeed: 0.1
|
||||
distance: 0.5
|
||||
pitchMinMax: {x: -20, y: 80}
|
||||
--- !u!222 &102363872365703344
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1286,3 +1432,4 @@ SceneRoots:
|
||||
- {fileID: 1089184134}
|
||||
- {fileID: 1269024859}
|
||||
- {fileID: 35403208}
|
||||
- {fileID: 2114935606}
|
||||
|
||||
903
Assets/Scenes/TestUIPanels/TestUI3DObjShow.unity
Normal file
903
Assets/Scenes/TestUIPanels/TestUI3DObjShow.unity
Normal file
@ -0,0 +1,903 @@
|
||||
%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: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 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: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
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
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &216873862
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 216873863}
|
||||
m_Layer: 5
|
||||
m_Name: PopUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &216873863
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 216873862}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.0000799, y: 1.0000799, z: 1.0000799}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &435973666
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 435973667}
|
||||
- component: {fileID: 435973670}
|
||||
- component: {fileID: 435973669}
|
||||
- component: {fileID: 435973668}
|
||||
m_Layer: 5
|
||||
m_Name: RightBottom
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &435973667
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 435973666}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1828.92, y: 0}
|
||||
m_Pivot: {x: 1, y: -0.000000461936}
|
||||
--- !u!222 &435973668
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 435973666}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &435973669
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 435973666}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &435973670
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 435973666}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 10
|
||||
m_Bottom: 10
|
||||
m_ChildAlignment: 8
|
||||
m_Spacing: 10
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 1
|
||||
m_ReverseArrangement: 1
|
||||
--- !u!1 &473433458
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 473433459}
|
||||
- component: {fileID: 473433460}
|
||||
m_Layer: 5
|
||||
m_Name: Design
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &473433459
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 473433458}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1213316429212896501}
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &473433460
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 473433458}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6eba024ea32574239b57b098f1dc6282, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &706701115
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 706701116}
|
||||
- component: {fileID: 706701117}
|
||||
m_Layer: 5
|
||||
m_Name: Manager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &706701116
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 706701115}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &706701117
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 706701115}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5dc84f25d84334e168bf64050b91e1fb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &893170084
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 893170085}
|
||||
m_Layer: 5
|
||||
m_Name: Bg
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &893170085
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 893170084}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1099231517
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1099231518}
|
||||
m_Layer: 5
|
||||
m_Name: CanvasPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1099231518
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1099231517}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1280916684
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1280916685}
|
||||
- component: {fileID: 1280916687}
|
||||
- component: {fileID: 1280916686}
|
||||
m_Layer: 5
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1280916685
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1280916684}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1280916686
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1280916684}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 1
|
||||
--- !u!114 &1280916687
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1280916684}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 5
|
||||
--- !u!1 &1330332767
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1330332770}
|
||||
- component: {fileID: 1330332768}
|
||||
- component: {fileID: 1330332769}
|
||||
m_Layer: 5
|
||||
m_Name: UICamera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!20 &1330332768
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1330332767}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 3
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
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: 1
|
||||
orthographic size: 5
|
||||
m_Depth: 99
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 32
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!124 &1330332769
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1330332767}
|
||||
m_Enabled: 1
|
||||
--- !u!4 &1330332770
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1330332767}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -100}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1406582490
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1406582491}
|
||||
m_Layer: 5
|
||||
m_Name: Common
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1406582491
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1406582490}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1419864230}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1419864225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1419864230}
|
||||
- component: {fileID: 1419864229}
|
||||
- component: {fileID: 1419864228}
|
||||
- component: {fileID: 1419864227}
|
||||
- component: {fileID: 1419864226}
|
||||
m_Layer: 5
|
||||
m_Name: UIRoot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1419864226
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419864225}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d2db7fffd623c478eba3d2cb84034d2f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
UICamera: {fileID: 1330332768}
|
||||
Canvas: {fileID: 1419864229}
|
||||
CanvasScaler: {fileID: 1419864228}
|
||||
GraphicRaycaster: {fileID: 1419864227}
|
||||
Bg: {fileID: 893170085}
|
||||
Common: {fileID: 1406582491}
|
||||
PopUI: {fileID: 216873863}
|
||||
RightBottom: {fileID: 435973667}
|
||||
CanvasPanel: {fileID: 1099231518}
|
||||
--- !u!114 &1419864227
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419864225}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 0
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1419864228
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419864225}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0.5
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1419864229
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419864225}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 1330332768}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 1
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 100
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1419864230
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419864225}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 893170085}
|
||||
- {fileID: 1406582491}
|
||||
- {fileID: 216873863}
|
||||
- {fileID: 435973667}
|
||||
- {fileID: 1099231518}
|
||||
- {fileID: 473433459}
|
||||
- {fileID: 1280916685}
|
||||
- {fileID: 1330332770}
|
||||
- {fileID: 706701116}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &2132194801
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2132194803}
|
||||
- component: {fileID: 2132194802}
|
||||
m_Layer: 0
|
||||
m_Name: TestUI3DObjShow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2132194802
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2132194801}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b6b7a3e7dc894eaca1053ef166cdad33, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PanelName: UI3DObjShow
|
||||
Level: 0
|
||||
mOtherPanels: []
|
||||
--- !u!4 &2132194803
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2132194801}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1213316429212896500
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 473433459}
|
||||
m_Modifications:
|
||||
- target: {fileID: -6608259679228875983, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: ItemPrefab
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7417210800730282872, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7722633404760475414, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: UI3DObjShow
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
--- !u!224 &1213316429212896501 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8188781184013275445, guid: 0e73fb7e22f2e74458d624bed84eac4a, type: 3}
|
||||
m_PrefabInstance: {fileID: 1213316429212896500}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1419864230}
|
||||
- {fileID: 2132194803}
|
||||
7
Assets/Scenes/TestUIPanels/TestUI3DObjShow.unity.meta
Normal file
7
Assets/Scenes/TestUIPanels/TestUI3DObjShow.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e9212c6760e8dc4cbe6a1c4cf0bcafb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -22,6 +22,7 @@ public class ActionHelper
|
||||
{ "UIInstruction", typeof(QFramework.Example.UIInstruction) },
|
||||
{ "UIScore", typeof(QFramework.Example.UIScore) },
|
||||
{ "UIImageTip", typeof(QFramework.Example.UIImageTip) },
|
||||
{ "UI3DObjShow", typeof(QFramework.Example.UI3DObjShow) },
|
||||
|
||||
};
|
||||
|
||||
@ -252,7 +253,11 @@ public class ActionHelper
|
||||
var dictAction = (XMLTool.DictionaryAction)act;
|
||||
return QFramework.ImageTipAction.Allocate(dictAction.args);
|
||||
}
|
||||
|
||||
case "3DObjShow":
|
||||
{
|
||||
var dictAction = (XMLTool.Show3DAction)act;
|
||||
return QFramework.Show3DAction.Allocate(dictAction.data);
|
||||
}
|
||||
default:
|
||||
Debug.LogError($"ûÓÐÕÒµ½´ËActionµÄÀàÐÍ{act.Type}");
|
||||
break;
|
||||
|
||||
75
Assets/Scripts/Actions/Show3DAction.cs
Normal file
75
Assets/Scripts/Actions/Show3DAction.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using QFramework.Example;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QFramework
|
||||
{
|
||||
internal class Show3DAction : IAction
|
||||
{
|
||||
public System.Action OnFinished { get; set; }
|
||||
|
||||
|
||||
private Show3DAction()
|
||||
{
|
||||
}
|
||||
|
||||
private static readonly SimpleObjectPool<Show3DAction> mPool =
|
||||
new SimpleObjectPool<Show3DAction>(() => new Show3DAction(), null, 10);
|
||||
UI3DObjShowData data;
|
||||
public static Show3DAction Allocate(UI3DObjShowData data, System.Action OnFinished = null)
|
||||
{
|
||||
var retNode = mPool.Allocate();
|
||||
retNode.ActionID = ActionKit.ID_GENERATOR++;
|
||||
retNode.Deinited = false;
|
||||
retNode.Reset();
|
||||
retNode.OnFinished = OnFinished;
|
||||
retNode.data = data;
|
||||
return retNode;
|
||||
}
|
||||
|
||||
|
||||
public ulong ActionID { get; set; }
|
||||
public ActionStatus Status { get; set; }
|
||||
|
||||
public void OnStart()
|
||||
{
|
||||
UIKit.OpenPanelAsync<UI3DObjShow>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() =>
|
||||
{
|
||||
this.Finish();
|
||||
});
|
||||
}
|
||||
|
||||
public void OnExecute(float dt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnFinish()
|
||||
{
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
Status = ActionStatus.NotStart;
|
||||
Paused = false;
|
||||
}
|
||||
|
||||
public bool Paused { get; set; }
|
||||
|
||||
public void Deinit()
|
||||
{
|
||||
if (!Deinited)
|
||||
{
|
||||
data = null;
|
||||
OnFinished = null;
|
||||
Deinited = true;
|
||||
mPool.Recycle(this);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Deinited { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
11
Assets/Scripts/Actions/Show3DAction.cs.meta
Normal file
11
Assets/Scripts/Actions/Show3DAction.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 241c472a6d610e64ebb7c256d5038346
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
166
Assets/Scripts/Item/Show3DCamera.cs
Normal file
166
Assets/Scripts/Item/Show3DCamera.cs
Normal file
@ -0,0 +1,166 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Show3DCamera : MonoBehaviour
|
||||
{
|
||||
public Transform target; // 围绕旋转的目标点
|
||||
public float rotateSpeed = 10f; // 旋转速度
|
||||
public float moveSpeed = 10f; // 移动速度
|
||||
public float distance = 10f; // 相机与目标的距离
|
||||
public Vector2 pitchMinMax = new Vector2(-20, 80); // 相机俯仰角范围
|
||||
|
||||
private Vector3 offset; // 相机与目标的偏移量
|
||||
private float yaw = 0f; // 偏航角(左右旋转)
|
||||
private float pitch = 0f; // 俯仰角(上下旋转)
|
||||
|
||||
public static Show3DCamera instance;
|
||||
|
||||
int rawWidth;
|
||||
int rawHeight;
|
||||
Camera self;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
self = transform.GetComponent<Camera>();
|
||||
DontDestroyOnLoad(this);
|
||||
}
|
||||
public void Set(int width,int height, Transform target, float rotateSpeed = 10, float moveSpeed = 0.1f, float distance = 0.1f, float pitchMin = -20, float pitchMax = 80)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Debug.LogError("Target is not assigned!");
|
||||
return;
|
||||
}
|
||||
this.rawWidth = width;
|
||||
this.rawHeight = height;
|
||||
yaw = 0;
|
||||
pitch = 0;
|
||||
this.target = target.transform;
|
||||
this.rotateSpeed = rotateSpeed;
|
||||
this.moveSpeed = moveSpeed;
|
||||
this.distance = distance;
|
||||
this.pitchMinMax = new Vector2(pitchMin, pitchMax);
|
||||
// 初始化相机位置
|
||||
offset = new Vector3(0, 0, -distance);
|
||||
UpdateCameraPosition();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
target = null;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target != null)
|
||||
{
|
||||
// 按住鼠标左键时旋转相机
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
RotateCamera();
|
||||
}
|
||||
|
||||
// 鼠标滚轮缩放
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (scroll != 0)
|
||||
{
|
||||
ZoomCamera(scroll);
|
||||
}
|
||||
|
||||
|
||||
// 按住鼠标右键时移动目标点
|
||||
if (Input.GetMouseButton(1))
|
||||
{
|
||||
MoveTarget();
|
||||
}
|
||||
|
||||
DetectHoveredObject();
|
||||
}
|
||||
}
|
||||
|
||||
// 检测鼠标悬停的物体
|
||||
private void DetectHoveredObject()
|
||||
{
|
||||
// 从相机发射射线
|
||||
Ray ray = self.ScreenPointToRay(ConvertScreenToRenderTextureCoordinates(Input.mousePosition));
|
||||
if (Physics.Raycast(ray, out RaycastHit hit))
|
||||
{
|
||||
// 打印物体名称
|
||||
Debug.LogError("Hovered Object: " + hit.collider.gameObject.name);
|
||||
}
|
||||
Debug.DrawLine(ray.origin, hit.point, Color.red);
|
||||
}
|
||||
|
||||
private Vector3 ConvertScreenToRenderTextureCoordinates(Vector3 screenPosition)
|
||||
{
|
||||
// 获取屏幕分辨率
|
||||
int screenWidth = Screen.width;
|
||||
int screenHeight = Screen.height;
|
||||
|
||||
|
||||
// 计算比例
|
||||
float scaleX = (float)rawWidth / screenWidth;
|
||||
float scaleY = (float)rawHeight / screenHeight;
|
||||
|
||||
// 转换鼠标位置
|
||||
Vector3 renderTexturePosition = new Vector3(
|
||||
screenPosition.x * scaleX,
|
||||
screenPosition.y * scaleY,
|
||||
screenPosition.z
|
||||
);
|
||||
|
||||
return renderTexturePosition;
|
||||
}
|
||||
|
||||
|
||||
// 移动目标点
|
||||
private void MoveTarget()
|
||||
{
|
||||
float mouseX = Input.GetAxis("Mouse X") * moveSpeed;
|
||||
float mouseY = Input.GetAxis("Mouse Y") * moveSpeed;
|
||||
|
||||
transform.Translate(new Vector3(-mouseX, -mouseY, 0));
|
||||
}
|
||||
// 缩放相机
|
||||
private void ZoomCamera(float scroll)
|
||||
{
|
||||
distance -= scroll * 5f; // 调整缩放速度
|
||||
distance = Mathf.Clamp(distance, 0.2f, 20f); // 限制距离范围
|
||||
offset = new Vector3(0, 0, -distance);
|
||||
UpdateCameraPosition();
|
||||
}
|
||||
|
||||
// 旋转相机
|
||||
private void RotateCamera()
|
||||
{
|
||||
// 获取鼠标移动量
|
||||
float mouseX = Input.GetAxis("Mouse X") * rotateSpeed;
|
||||
float mouseY = Input.GetAxis("Mouse Y") * rotateSpeed;
|
||||
|
||||
// 更新偏航角和俯仰角
|
||||
yaw += mouseX;
|
||||
pitch -= mouseY; // 注意:鼠标 Y 轴移动方向与俯仰角相反
|
||||
pitch = Mathf.Clamp(pitch, pitchMinMax.x, pitchMinMax.y); // 限制俯仰角范围
|
||||
|
||||
// 更新相机位置
|
||||
UpdateCameraPosition();
|
||||
}
|
||||
|
||||
// 更新相机位置和朝向
|
||||
private void UpdateCameraPosition()
|
||||
{
|
||||
// 计算旋转后的偏移量
|
||||
Quaternion rotation = Quaternion.Euler(pitch, yaw, 0);
|
||||
Vector3 rotatedOffset = rotation * offset;
|
||||
|
||||
// 更新相机位置
|
||||
transform.position = target.position + rotatedOffset;
|
||||
|
||||
// 相机始终朝向目标点
|
||||
transform.LookAt(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
Assets/Scripts/Item/Show3DCamera.cs.meta
Normal file
11
Assets/Scripts/Item/Show3DCamera.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35f672d48a4ed2349bb724d185d6a153
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
55
Assets/Scripts/UI/UI3DObjShow.Designer.cs
generated
Normal file
55
Assets/Scripts/UI/UI3DObjShow.Designer.cs
generated
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using QFramework;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
// Generate Id:5590b0b6-d056-4a95-a14d-4e5b14aedaac
|
||||
public partial class UI3DObjShow
|
||||
{
|
||||
public const string Name = "UI3DObjShow";
|
||||
|
||||
[SerializeField]
|
||||
public UnityEngine.UI.ScrollRect Scroll;
|
||||
[SerializeField]
|
||||
public RectTransform Content;
|
||||
[SerializeField]
|
||||
public UnityEngine.UI.RawImage DeviceRawImage;
|
||||
[SerializeField]
|
||||
public UnityEngine.UI.Image ItemPrefab;
|
||||
|
||||
private UI3DObjShowData mPrivateData = null;
|
||||
|
||||
protected override void ClearUIComponents()
|
||||
{
|
||||
Scroll = null;
|
||||
Content = null;
|
||||
DeviceRawImage = null;
|
||||
ItemPrefab = null;
|
||||
|
||||
mData = null;
|
||||
}
|
||||
|
||||
public UI3DObjShowData Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return mData;
|
||||
}
|
||||
}
|
||||
|
||||
UI3DObjShowData mData
|
||||
{
|
||||
get
|
||||
{
|
||||
return mPrivateData ?? (mPrivateData = new UI3DObjShowData());
|
||||
}
|
||||
set
|
||||
{
|
||||
mUIData = value;
|
||||
mPrivateData = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/UI3DObjShow.Designer.cs.meta
Normal file
11
Assets/Scripts/UI/UI3DObjShow.Designer.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03401367f13f3624f97b7a828cdf204d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
97
Assets/Scripts/UI/UI3DObjShow.cs
Normal file
97
Assets/Scripts/UI/UI3DObjShow.cs
Normal file
@ -0,0 +1,97 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using XMLTool;
|
||||
using System.Collections.Generic;
|
||||
using static UnityEditor.Progress;
|
||||
using TMPro;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
public class UI3DObjShowData : UIPanelData
|
||||
{
|
||||
public class ObjData
|
||||
{
|
||||
public Vector3 rotate = Vector3.zero;
|
||||
public Vector3 position = Vector3.zero;
|
||||
public Vector3 scale = Vector3.one;
|
||||
public float rotateSpeed = 10;
|
||||
public float moveSpeed = 0.1f;
|
||||
public float distance = 0.2f;
|
||||
public float pitchMin = -30f;
|
||||
public float pitchMax = 80;
|
||||
public string deviceName;
|
||||
}
|
||||
public List<ObjData> datas;
|
||||
}
|
||||
public partial class UI3DObjShow : UIPanel
|
||||
{
|
||||
ResLoader loader;
|
||||
GameObject curObj;
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
loader = ResLoader.Allocate();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UI3DObjShowData ?? new UI3DObjShowData();
|
||||
FreeCameraController.instance.SetLock(false, false);
|
||||
Content.RemoveAllChildren();
|
||||
foreach (var data in mData.datas)
|
||||
{
|
||||
var item = DeviceController.Instance.GetDevice(data.deviceName);
|
||||
GameObject obj = GameObject.Instantiate(ItemPrefab.gameObject, Content);
|
||||
obj.name = item.Name;
|
||||
obj.transform.Find("Name").GetComponent<TextMeshProUGUI>().text = item.Name;
|
||||
Image icon = obj.transform.Find("IconBg/Icon").GetComponent<Image>();
|
||||
var localImageUrl = Global.deviceIconsPath + item.Icon;
|
||||
loader.Add2Load(localImageUrl.ToNetImageResName(),
|
||||
(bool success, IRes res) =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
icon.sprite = Utility.GetSprite(res.Asset as Texture2D);
|
||||
}
|
||||
});
|
||||
obj.GetComponent<Toggle>().onValueChanged.AddListener(isOn =>
|
||||
{
|
||||
if (isOn)
|
||||
{
|
||||
curObj = GameObject.Instantiate(DeviceController.Instance.GetDeviceObj(data.deviceName));
|
||||
curObj.transform.position = data.position;
|
||||
curObj.transform.localScale = data.scale;
|
||||
curObj.transform.eulerAngles = data.rotate;
|
||||
curObj.gameObject.SetActive(true);
|
||||
Show3DCamera.instance.Set(DeviceRawImage.texture.width, DeviceRawImage.texture.height, curObj.transform, data.rotateSpeed, data.moveSpeed, data.distance, data.pitchMin, data.pitchMax);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (curObj)
|
||||
{
|
||||
Show3DCamera.instance.Clear();
|
||||
GameObject.Destroy(curObj);
|
||||
curObj = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
loader.LoadAsync();
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
FreeCameraController.instance.SetLock(true, true);
|
||||
loader.Recycle2Cache();
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/UI3DObjShow.cs.meta
Normal file
11
Assets/Scripts/UI/UI3DObjShow.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2922fa71b7d60e942b5b06b785dc37c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -2,8 +2,10 @@ using Microsoft.SqlServer.Server;
|
||||
using QFramework;
|
||||
using QFramework.Example;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using UnityEditor.ShaderGraph.Internal;
|
||||
using UnityEngine;
|
||||
using static QFramework.Example.UIInputData;
|
||||
using static UnityEditor.Progress;
|
||||
@ -103,7 +105,10 @@ namespace XMLTool
|
||||
public UIInputData data;
|
||||
}
|
||||
|
||||
|
||||
public class Show3DAction : Action
|
||||
{
|
||||
public UI3DObjShowData data;
|
||||
}
|
||||
|
||||
|
||||
public class Condition : ActionItem
|
||||
@ -1278,6 +1283,61 @@ namespace XMLTool
|
||||
newAction = act;
|
||||
}
|
||||
break;
|
||||
case "3DObjShow":
|
||||
{
|
||||
var act = new Show3DAction();
|
||||
act.data = new UI3DObjShowData();
|
||||
act.data.datas = new List<UI3DObjShowData.ObjData>();
|
||||
foreach (var item in action.Elements("Object"))
|
||||
{
|
||||
UI3DObjShowData.ObjData objData = new UI3DObjShowData.ObjData();
|
||||
objData.deviceName = item.Attribute("deviceName")?.Value;
|
||||
|
||||
XAttribute position = item.Attribute("position");
|
||||
if (position != null)
|
||||
{
|
||||
objData.position = Utility.GetVector3FromStrArray(position.Value);
|
||||
}
|
||||
XAttribute rotate = item.Attribute("rotate");
|
||||
if (rotate != null)
|
||||
{
|
||||
objData.rotate = Utility.GetVector3FromStrArray(rotate.Value);
|
||||
}
|
||||
XAttribute scale = item.Attribute("scale");
|
||||
if (scale != null)
|
||||
{
|
||||
objData.scale = Utility.GetVector3FromStrArray(scale.Value);
|
||||
}
|
||||
XAttribute rotateSpeed = item.Attribute("rotateSpeed");
|
||||
if (rotateSpeed != null)
|
||||
{
|
||||
float.TryParse(rotateSpeed.Value, out objData.rotateSpeed);
|
||||
}
|
||||
XAttribute moveSpeed = item.Attribute("moveSpeed");
|
||||
if (moveSpeed != null)
|
||||
{
|
||||
float.TryParse(moveSpeed.Value, out objData.moveSpeed);
|
||||
}
|
||||
XAttribute distance = item.Attribute("distance");
|
||||
if (distance != null)
|
||||
{
|
||||
float.TryParse(distance.Value, out objData.distance);
|
||||
}
|
||||
XAttribute pitchMin = item.Attribute("pitchMin");
|
||||
if (pitchMin != null)
|
||||
{
|
||||
float.TryParse(pitchMin.Value, out objData.pitchMin);
|
||||
}
|
||||
XAttribute pitchMax = item.Attribute("pitchMax");
|
||||
if (pitchMax != null)
|
||||
{
|
||||
float.TryParse(pitchMax.Value, out objData.pitchMax);
|
||||
}
|
||||
act.data.datas.Add(objData);
|
||||
}
|
||||
newAction = act;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
newAction = new Action();
|
||||
break;
|
||||
|
||||
@ -639,6 +639,12 @@
|
||||
</Reset>
|
||||
<Start>
|
||||
<Action type="Sequence">
|
||||
|
||||
|
||||
<Action type="3DObjShow">
|
||||
<Object deviceName="器械盒" position="10000,10000,10000" rotate="0,90,0" rotateSpeed="11" moveSpeed="0.12" distance="0.25" pitchMin="-31" pitchMax="81"></Object>
|
||||
<Object deviceName="创巾钳"></Object>
|
||||
</Action>
|
||||
<!--<Action type="CameraSwitch" nearDevice="肠钳" normalDevice="组织钳" isNear="false"></Action>-->
|
||||
<Action type="CameraSwitch" nearPos="-3.543,3.007,-1.463" nearRot="27.9597,270,2.899792E-06" normalPos="-3.206,3.24,-1.425" normalRot="27.9597,270,2.899792E-06" isNear="false"></Action>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user