22 - Basic Scripting Example.unity 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. %YAML 1.1
  2. %TAG !u! tag:unity3d.com,2011:
  3. --- !u!29 &1
  4. OcclusionCullingSettings:
  5. m_ObjectHideFlags: 0
  6. serializedVersion: 2
  7. m_OcclusionBakeSettings:
  8. smallestOccluder: 5
  9. smallestHole: 0.25
  10. backfaceThreshold: 100
  11. m_SceneGUID: 00000000000000000000000000000000
  12. m_OcclusionCullingData: {fileID: 0}
  13. --- !u!104 &2
  14. RenderSettings:
  15. m_ObjectHideFlags: 0
  16. serializedVersion: 9
  17. m_Fog: 0
  18. m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
  19. m_FogMode: 3
  20. m_FogDensity: 0.01
  21. m_LinearFogStart: 0
  22. m_LinearFogEnd: 300
  23. m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
  24. m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
  25. m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
  26. m_AmbientIntensity: 1
  27. m_AmbientMode: 3
  28. m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
  29. m_SkyboxMaterial: {fileID: 0}
  30. m_HaloStrength: 0.5
  31. m_FlareStrength: 1
  32. m_FlareFadeSpeed: 3
  33. m_HaloTexture: {fileID: 0}
  34. m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
  35. m_DefaultReflectionMode: 0
  36. m_DefaultReflectionResolution: 128
  37. m_ReflectionBounces: 1
  38. m_ReflectionIntensity: 1
  39. m_CustomReflection: {fileID: 0}
  40. m_Sun: {fileID: 0}
  41. m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
  42. m_UseRadianceAmbientProbe: 0
  43. --- !u!157 &3
  44. LightmapSettings:
  45. m_ObjectHideFlags: 0
  46. serializedVersion: 11
  47. m_GIWorkflowMode: 1
  48. m_GISettings:
  49. serializedVersion: 2
  50. m_BounceScale: 1
  51. m_IndirectOutputScale: 1
  52. m_AlbedoBoost: 1
  53. m_EnvironmentLightingMode: 0
  54. m_EnableBakedLightmaps: 0
  55. m_EnableRealtimeLightmaps: 0
  56. m_LightmapEditorSettings:
  57. serializedVersion: 10
  58. m_Resolution: 2
  59. m_BakeResolution: 40
  60. m_AtlasSize: 1024
  61. m_AO: 0
  62. m_AOMaxDistance: 1
  63. m_CompAOExponent: 0
  64. m_CompAOExponentDirect: 0
  65. m_Padding: 2
  66. m_LightmapParameters: {fileID: 0}
  67. m_LightmapsBakeMode: 1
  68. m_TextureCompression: 1
  69. m_FinalGather: 0
  70. m_FinalGatherFiltering: 1
  71. m_FinalGatherRayCount: 1024
  72. m_ReflectionCompression: 2
  73. m_MixedBakeMode: 1
  74. m_BakeBackend: 0
  75. m_PVRSampling: 1
  76. m_PVRDirectSampleCount: 32
  77. m_PVRSampleCount: 500
  78. m_PVRBounces: 2
  79. m_PVRFilterTypeDirect: 0
  80. m_PVRFilterTypeIndirect: 0
  81. m_PVRFilterTypeAO: 0
  82. m_PVRFilteringMode: 0
  83. m_PVRCulling: 1
  84. m_PVRFilteringGaussRadiusDirect: 1
  85. m_PVRFilteringGaussRadiusIndirect: 5
  86. m_PVRFilteringGaussRadiusAO: 2
  87. m_PVRFilteringAtrousPositionSigmaDirect: 0.5
  88. m_PVRFilteringAtrousPositionSigmaIndirect: 2
  89. m_PVRFilteringAtrousPositionSigmaAO: 1
  90. m_ShowResolutionOverlay: 1
  91. m_LightingDataAsset: {fileID: 0}
  92. m_UseShadowmask: 0
  93. --- !u!196 &4
  94. NavMeshSettings:
  95. serializedVersion: 2
  96. m_ObjectHideFlags: 0
  97. m_BuildSettings:
  98. serializedVersion: 2
  99. agentTypeID: 0
  100. agentRadius: 0.5
  101. agentHeight: 2
  102. agentSlope: 45
  103. agentClimb: 0.4
  104. ledgeDropHeight: 0
  105. maxJumpAcrossDistance: 0
  106. minRegionArea: 2
  107. manualCellSize: 0
  108. cellSize: 0.16666667
  109. manualTileSize: 0
  110. tileSize: 256
  111. accuratePlacement: 0
  112. debug:
  113. m_Flags: 0
  114. m_NavMeshData: {fileID: 0}
  115. --- !u!1 &486248254
  116. GameObject:
  117. m_ObjectHideFlags: 0
  118. m_CorrespondingSourceObject: {fileID: 0}
  119. m_PrefabInstance: {fileID: 0}
  120. m_PrefabAsset: {fileID: 0}
  121. serializedVersion: 6
  122. m_Component:
  123. - component: {fileID: 486248258}
  124. - component: {fileID: 486248257}
  125. - component: {fileID: 486248256}
  126. - component: {fileID: 486248255}
  127. m_Layer: 0
  128. m_Name: EventSystem
  129. m_TagString: Untagged
  130. m_Icon: {fileID: 0}
  131. m_NavMeshLayer: 0
  132. m_StaticEditorFlags: 0
  133. m_IsActive: 1
  134. --- !u!114 &486248255
  135. MonoBehaviour:
  136. m_ObjectHideFlags: 0
  137. m_CorrespondingSourceObject: {fileID: 0}
  138. m_PrefabInstance: {fileID: 0}
  139. m_PrefabAsset: {fileID: 0}
  140. m_GameObject: {fileID: 486248254}
  141. m_Enabled: 1
  142. m_EditorHideFlags: 0
  143. m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  144. m_Name:
  145. m_EditorClassIdentifier:
  146. m_ForceModuleActive: 0
  147. --- !u!114 &486248256
  148. MonoBehaviour:
  149. m_ObjectHideFlags: 0
  150. m_CorrespondingSourceObject: {fileID: 0}
  151. m_PrefabInstance: {fileID: 0}
  152. m_PrefabAsset: {fileID: 0}
  153. m_GameObject: {fileID: 486248254}
  154. m_Enabled: 1
  155. m_EditorHideFlags: 0
  156. m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  157. m_Name:
  158. m_EditorClassIdentifier:
  159. m_HorizontalAxis: Horizontal
  160. m_VerticalAxis: Vertical
  161. m_SubmitButton: Submit
  162. m_CancelButton: Cancel
  163. m_InputActionsPerSecond: 10
  164. m_RepeatDelay: 0.5
  165. m_ForceModuleActive: 0
  166. --- !u!114 &486248257
  167. MonoBehaviour:
  168. m_ObjectHideFlags: 0
  169. m_CorrespondingSourceObject: {fileID: 0}
  170. m_PrefabInstance: {fileID: 0}
  171. m_PrefabAsset: {fileID: 0}
  172. m_GameObject: {fileID: 486248254}
  173. m_Enabled: 1
  174. m_EditorHideFlags: 0
  175. m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  176. m_Name:
  177. m_EditorClassIdentifier:
  178. m_FirstSelected: {fileID: 0}
  179. m_sendNavigationEvents: 1
  180. m_DragThreshold: 5
  181. --- !u!4 &486248258
  182. Transform:
  183. m_ObjectHideFlags: 0
  184. m_CorrespondingSourceObject: {fileID: 0}
  185. m_PrefabInstance: {fileID: 0}
  186. m_PrefabAsset: {fileID: 0}
  187. m_GameObject: {fileID: 486248254}
  188. m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  189. m_LocalPosition: {x: 0, y: 0, z: 0}
  190. m_LocalScale: {x: 1, y: 1, z: 1}
  191. m_Children: []
  192. m_Father: {fileID: 0}
  193. m_RootOrder: 2
  194. m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  195. --- !u!1 &691654662
  196. GameObject:
  197. m_ObjectHideFlags: 0
  198. m_CorrespondingSourceObject: {fileID: 0}
  199. m_PrefabInstance: {fileID: 0}
  200. m_PrefabAsset: {fileID: 0}
  201. serializedVersion: 6
  202. m_Component:
  203. - component: {fileID: 691654663}
  204. - component: {fileID: 691654665}
  205. - component: {fileID: 691654664}
  206. m_Layer: 0
  207. m_Name: Canvas
  208. m_TagString: Untagged
  209. m_Icon: {fileID: 0}
  210. m_NavMeshLayer: 0
  211. m_StaticEditorFlags: 0
  212. m_IsActive: 1
  213. --- !u!224 &691654663
  214. RectTransform:
  215. m_ObjectHideFlags: 0
  216. m_CorrespondingSourceObject: {fileID: 0}
  217. m_PrefabInstance: {fileID: 0}
  218. m_PrefabAsset: {fileID: 0}
  219. m_GameObject: {fileID: 691654662}
  220. m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  221. m_LocalPosition: {x: 0, y: 0, z: 0}
  222. m_LocalScale: {x: 0, y: 0, z: 0}
  223. m_Children:
  224. - {fileID: 993643434}
  225. m_Father: {fileID: 0}
  226. m_RootOrder: 1
  227. m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  228. m_AnchorMin: {x: 0, y: 0}
  229. m_AnchorMax: {x: 0, y: 0}
  230. m_AnchoredPosition: {x: 0, y: 0}
  231. m_SizeDelta: {x: 0, y: 0}
  232. m_Pivot: {x: 0, y: 0}
  233. --- !u!114 &691654664
  234. MonoBehaviour:
  235. m_ObjectHideFlags: 0
  236. m_CorrespondingSourceObject: {fileID: 0}
  237. m_PrefabInstance: {fileID: 0}
  238. m_PrefabAsset: {fileID: 0}
  239. m_GameObject: {fileID: 691654662}
  240. m_Enabled: 1
  241. m_EditorHideFlags: 0
  242. m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  243. m_Name:
  244. m_EditorClassIdentifier:
  245. m_IgnoreReversedGraphics: 1
  246. m_BlockingObjects: 0
  247. m_BlockingMask:
  248. serializedVersion: 2
  249. m_Bits: 4294967295
  250. --- !u!223 &691654665
  251. Canvas:
  252. m_ObjectHideFlags: 0
  253. m_CorrespondingSourceObject: {fileID: 0}
  254. m_PrefabInstance: {fileID: 0}
  255. m_PrefabAsset: {fileID: 0}
  256. m_GameObject: {fileID: 691654662}
  257. m_Enabled: 1
  258. serializedVersion: 3
  259. m_RenderMode: 1
  260. m_Camera: {fileID: 1166195106}
  261. m_PlaneDistance: 100
  262. m_PixelPerfect: 0
  263. m_ReceivesEvents: 1
  264. m_OverrideSorting: 0
  265. m_OverridePixelPerfect: 0
  266. m_SortingBucketNormalizedSize: 0
  267. m_AdditionalShaderChannelsFlag: 25
  268. m_SortingLayerID: 0
  269. m_SortingOrder: 0
  270. m_TargetDisplay: 0
  271. --- !u!1 &993643432
  272. GameObject:
  273. m_ObjectHideFlags: 0
  274. m_CorrespondingSourceObject: {fileID: 0}
  275. m_PrefabInstance: {fileID: 0}
  276. m_PrefabAsset: {fileID: 0}
  277. serializedVersion: 6
  278. m_Component:
  279. - component: {fileID: 993643434}
  280. - component: {fileID: 993643433}
  281. m_Layer: 0
  282. m_Name: 'Text Object #1'
  283. m_TagString: Untagged
  284. m_Icon: {fileID: 0}
  285. m_NavMeshLayer: 0
  286. m_StaticEditorFlags: 0
  287. m_IsActive: 1
  288. --- !u!114 &993643433
  289. MonoBehaviour:
  290. m_ObjectHideFlags: 0
  291. m_CorrespondingSourceObject: {fileID: 0}
  292. m_PrefabInstance: {fileID: 0}
  293. m_PrefabAsset: {fileID: 0}
  294. m_GameObject: {fileID: 993643432}
  295. m_Enabled: 1
  296. m_EditorHideFlags: 0
  297. m_Script: {fileID: 11500000, guid: 6f2c5b59b6874405865e2616e4ec276a, type: 3}
  298. m_Name:
  299. m_EditorClassIdentifier:
  300. ObjectType: 1
  301. isStatic: 0
  302. --- !u!224 &993643434
  303. RectTransform:
  304. m_ObjectHideFlags: 0
  305. m_CorrespondingSourceObject: {fileID: 0}
  306. m_PrefabInstance: {fileID: 0}
  307. m_PrefabAsset: {fileID: 0}
  308. m_GameObject: {fileID: 993643432}
  309. m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  310. m_LocalPosition: {x: 0, y: 0, z: 0}
  311. m_LocalScale: {x: 1, y: 1, z: 1}
  312. m_Children: []
  313. m_Father: {fileID: 691654663}
  314. m_RootOrder: 0
  315. m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  316. m_AnchorMin: {x: 0.5, y: 0.5}
  317. m_AnchorMax: {x: 0.5, y: 0.5}
  318. m_AnchoredPosition: {x: 0, y: 75}
  319. m_SizeDelta: {x: 100, y: 100}
  320. m_Pivot: {x: 0.5, y: 0.5}
  321. --- !u!1 &1166195102
  322. GameObject:
  323. m_ObjectHideFlags: 0
  324. m_CorrespondingSourceObject: {fileID: 0}
  325. m_PrefabInstance: {fileID: 0}
  326. m_PrefabAsset: {fileID: 0}
  327. serializedVersion: 6
  328. m_Component:
  329. - component: {fileID: 1166195107}
  330. - component: {fileID: 1166195106}
  331. - component: {fileID: 1166195103}
  332. m_Layer: 0
  333. m_Name: Main Camera
  334. m_TagString: MainCamera
  335. m_Icon: {fileID: 0}
  336. m_NavMeshLayer: 0
  337. m_StaticEditorFlags: 0
  338. m_IsActive: 1
  339. --- !u!81 &1166195103
  340. AudioListener:
  341. m_ObjectHideFlags: 0
  342. m_CorrespondingSourceObject: {fileID: 0}
  343. m_PrefabInstance: {fileID: 0}
  344. m_PrefabAsset: {fileID: 0}
  345. m_GameObject: {fileID: 1166195102}
  346. m_Enabled: 1
  347. --- !u!20 &1166195106
  348. Camera:
  349. m_ObjectHideFlags: 0
  350. m_CorrespondingSourceObject: {fileID: 0}
  351. m_PrefabInstance: {fileID: 0}
  352. m_PrefabAsset: {fileID: 0}
  353. m_GameObject: {fileID: 1166195102}
  354. m_Enabled: 1
  355. serializedVersion: 2
  356. m_ClearFlags: 1
  357. m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
  358. m_projectionMatrixMode: 1
  359. m_SensorSize: {x: 36, y: 24}
  360. m_LensShift: {x: 0, y: 0}
  361. m_GateFitMode: 2
  362. m_FocalLength: 50
  363. m_NormalizedViewPortRect:
  364. serializedVersion: 2
  365. x: 0
  366. y: 0
  367. width: 1
  368. height: 1
  369. near clip plane: 0.3
  370. far clip plane: 1000
  371. field of view: 60
  372. orthographic: 1
  373. orthographic size: 36
  374. m_Depth: -1
  375. m_CullingMask:
  376. serializedVersion: 2
  377. m_Bits: 4294967295
  378. m_RenderingPath: -1
  379. m_TargetTexture: {fileID: 0}
  380. m_TargetDisplay: 0
  381. m_TargetEye: 3
  382. m_HDR: 0
  383. m_AllowMSAA: 1
  384. m_AllowDynamicResolution: 0
  385. m_ForceIntoRT: 0
  386. m_OcclusionCulling: 1
  387. m_StereoConvergence: 10
  388. m_StereoSeparation: 0.022
  389. --- !u!4 &1166195107
  390. Transform:
  391. m_ObjectHideFlags: 0
  392. m_CorrespondingSourceObject: {fileID: 0}
  393. m_PrefabInstance: {fileID: 0}
  394. m_PrefabAsset: {fileID: 0}
  395. m_GameObject: {fileID: 1166195102}
  396. m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  397. m_LocalPosition: {x: 0, y: 0, z: -10}
  398. m_LocalScale: {x: 1, y: 1, z: 1}
  399. m_Children: []
  400. m_Father: {fileID: 0}
  401. m_RootOrder: 0
  402. m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
  403. --- !u!1 &1590754846
  404. GameObject:
  405. m_ObjectHideFlags: 0
  406. m_CorrespondingSourceObject: {fileID: 0}
  407. m_PrefabInstance: {fileID: 0}
  408. m_PrefabAsset: {fileID: 0}
  409. serializedVersion: 6
  410. m_Component:
  411. - component: {fileID: 1590754848}
  412. - component: {fileID: 1590754847}
  413. m_Layer: 0
  414. m_Name: 'Text Object #2'
  415. m_TagString: Untagged
  416. m_Icon: {fileID: 0}
  417. m_NavMeshLayer: 0
  418. m_StaticEditorFlags: 0
  419. m_IsActive: 1
  420. --- !u!114 &1590754847
  421. MonoBehaviour:
  422. m_ObjectHideFlags: 0
  423. m_CorrespondingSourceObject: {fileID: 0}
  424. m_PrefabInstance: {fileID: 0}
  425. m_PrefabAsset: {fileID: 0}
  426. m_GameObject: {fileID: 1590754846}
  427. m_Enabled: 1
  428. m_EditorHideFlags: 0
  429. m_Script: {fileID: 11500000, guid: 6f2c5b59b6874405865e2616e4ec276a, type: 3}
  430. m_Name:
  431. m_EditorClassIdentifier:
  432. ObjectType: 0
  433. isStatic: 0
  434. --- !u!4 &1590754848
  435. Transform:
  436. m_ObjectHideFlags: 0
  437. m_CorrespondingSourceObject: {fileID: 0}
  438. m_PrefabInstance: {fileID: 0}
  439. m_PrefabAsset: {fileID: 0}
  440. m_GameObject: {fileID: 1590754846}
  441. m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  442. m_LocalPosition: {x: 0, y: -7.5, z: 0}
  443. m_LocalScale: {x: 1, y: 1, z: 1}
  444. m_Children: []
  445. m_Father: {fileID: 0}
  446. m_RootOrder: 3
  447. m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}