├── Elevator ├── Audio │ └── elevatorDing.ogg ├── Documentation │ ├── BuildSettings.jpg │ └── README.txt ├── Elevator.gif ├── Materials │ ├── d_ExternalFloorDoors.mat │ ├── d_buttonDown.mat │ ├── d_buttonUp.mat │ ├── d_elevatorMetal.mat │ ├── d_floor1.mat │ ├── d_floor2.mat │ ├── d_floor3.mat │ └── d_playerBlocker.mat ├── Prefabs │ └── ElevatorController.prefab ├── Requirements.txt ├── Scenes │ ├── MainFloor.unity │ ├── SecondFloor.unity │ └── ThirdFloor.unity ├── Scripts │ ├── ElevatorButton.cs │ └── ElevatorController.cs └── Textures │ ├── d_buttonDown.png │ ├── d_buttonUp.png │ ├── d_elevatorMetal.png │ ├── d_floor1.png │ ├── d_floor2.png │ ├── d_floor3.png │ └── d_playerBlocker.png ├── FPEKitCinemachine ├── CinemachineCut.gif ├── Documentation │ └── README.txt ├── Requirements.txt ├── Scenes │ └── TestCutscene.unity └── Scripts │ └── CutsceneTrigger.cs ├── FungusIntegration ├── Documentation │ └── README.txt ├── FPEKitWithFungus.gif ├── Materials │ ├── MysteryObject.mat │ └── MysteryObject.mat.meta ├── Requirements.txt ├── Resources │ └── Pickups │ │ └── MysteryObject.prefab ├── Scenes │ └── FungusTest.unity ├── Scripts │ └── FPEFungusHelper.cs └── Textures │ ├── mysteryObject.png │ └── mysteryObject.png.meta ├── README.md ├── StartDocked ├── Documentation │ └── DockStartChanges.txt ├── Requirements.txt ├── Scenes │ ├── DockStart.unity │ └── DockStartMainMenu.unity ├── Scripts │ └── FPEPlayerStartDocked.cs └── StartDocked.jpg ├── SurfaceFootsteps ├── Audio │ ├── PlayerFootstepsA.asset │ └── PlayerFootstepsB.asset ├── Documentation │ ├── SurfaceFootsteps.txt │ └── physicsLayerInteractions.jpg ├── Materials │ ├── SurfaceA.mat │ └── SurfaceB.mat ├── Requirements.txt ├── Scenes │ └── WalkSurfaceTest.unity ├── Scripts │ └── WalkableSurface.cs └── Textures │ ├── surfaceA.png │ └── surfaceB.png ├── Teleport ├── Prefabs │ └── Teleport.prefab ├── Requirements.txt ├── Scenes │ └── Teleport.unity ├── Scripts │ └── FPETeleport.cs └── Teleport.gif └── VirtualSnapshot ├── Documentation └── README.txt ├── Requirements.txt └── Scenes ├── IntegrationTest.unity └── IntegrationTest.unity.meta /Elevator/Audio/elevatorDing.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Audio/elevatorDing.ogg -------------------------------------------------------------------------------- /Elevator/Documentation/BuildSettings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Documentation/BuildSettings.jpg -------------------------------------------------------------------------------- /Elevator/Documentation/README.txt: -------------------------------------------------------------------------------- 1 | Elevator Level Loading 2 | ====================== 3 | 4 | =============== 5 | 1) Script Edits 6 | =============== 7 | 8 | Some light script editing is required to make the vanilla First Person Exploration Kit code (as of v2.0.2) work with the Elevator. 9 | 10 | 11 | ---------------------- 12 | Edits to FPEDoorway.cs: 13 | ---------------------- 14 | 15 | Add this new Inspector field 16 | 17 | [SerializeField, Tooltip("If true, player will be moved to doorway Entrance location when level load is complete. Set to false for things like automated 'elevator' level changes where player is being moved automatically.")] 18 | private bool movePlayerToEntranceOnSceneChange = true; 19 | public bool MovePlayerToEntranceOnSceneChange { 20 | get { return movePlayerToEntranceOnSceneChange; } 21 | } 22 | 23 | 24 | Also edit the contents of the OnTriggerEnter() function such that the calls to ChangeSceneToAndAutoSave() and ChangeSceneToNoSave() are given the new bool as a second parameter. For example: 25 | 26 | FPESaveLoadManager.Instance.ChangeSceneToAndAutoSave(connectedSceneIndex, movePlayerToEntranceOnSceneChange); 27 | 28 | 29 | ------------------------------ 30 | Edits to FPESaveLoadManager.cs: 31 | ------------------------------ 32 | 33 | Around line 60, add a new variable: 34 | 35 | private bool movePlayerOnSceneChange = false; 36 | 37 | In the function movePlayerToSuitableEntranceOrStartPosition(), there is an else block with comment "// Otherwise, yield to the appropriate doorway.". Wrap the entire body of that else block inside a new nested if statement: 38 | 39 | // Otherwise, yield to the appropriate doorway. 40 | else 41 | { 42 | 43 | if (movePlayerOnSceneChange) 44 | { 45 | 46 | } 47 | 48 | } 49 | 50 | This will ensure that the player is only moved for default doorway settings. You must uncheck the FPEDoorWay objects in the ElevatorController prefab so the player isn't moved when the elevator reaches the loading trigger. This will allow the elevator platform to move the player for you. If you leave the elevator FPEDoorways with the default, the player will be placed at the scene origin and fall out of the level. 51 | 52 | 53 | In the functions ChangeSceneToAndAutoSave() and public void ChangeSceneToNoSave(), change the functions to take a second argument: bool movePlayer 54 | 55 | Inside the body of both functions, add the line: 56 | 57 | movePlayerOnSceneChange = movePlayer; 58 | 59 | This will allow the FPEDoorway objects configuration to be passed to the FPESaveLoadManager object. 60 | 61 | 62 | Around lines 440 and 449, there are case statements for CHANGING_SCENE and CHANGING_SCENE_NOSAVE which set the variable resetPlayerLook to true. Instead, set resetPlayerLook = movePlayerOnSceneChange. This will allow non-moving doorways like the elevator shaft doorways to leave the player's look direction alone when loading the destination floor. 63 | 64 | 65 | ----------------------- 66 | Edits to FPEMainMenu.cs: 67 | ----------------------- 68 | 69 | Since we changed the FPESaveLoadManager ChangeSceneToNoSave() function to require a new parameter, we must also change a call to this inside FPEMainMenu. Around line 115, add "true" as the second parameter: 70 | 71 | FPESaveLoadManager.Instance.ChangeSceneToNoSave(FPESaveLoadManager.Instance.FirstLevelSceneBuildIndex, true); 72 | 73 | This will ensure we always move the player from main menu to the player start location when starting a new game. 74 | 75 | 76 | ====================== 77 | 2) Edit Build Settings: 78 | ====================== 79 | 80 | The included scenes (MainFloor, SecondFloor, and ThirdFloor) must be added as scenes index 1, 2, and 3. The default demoMainMenu scene must remain at index 0. Change this through File > Build Settings. See BuildSettings.jpg for reference. 81 | 82 | ===================== 83 | 3) Adding More Floors: 84 | ===================== 85 | 86 | To add or change floors, you must have: 87 | 88 | -A scene to load that contains an ElevatorController at the same location as other scenes ((0,0,0) recommended!) 89 | -A floor location that aligns vertically to the new scene's floor 90 | -A doorway object with an FPEDoorway component that has the new floor scene's build index set as the Connected Scene Index 91 | -An external doorway and set of elevator buttons for the new floor (prevents player from falling into elevator shaft, and allows player to call elevator to that floor) 92 | -You must assign the scene floor location, external door object, and doorway inside the child objects of ElevatorController (FloorLocations, ExternalFloorDoors, and FloorDoorways respectively) 93 | 94 | Don't forget to apply these changes to the prefab so that all scenes will have the new floor information! 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Elevator/Elevator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Elevator.gif -------------------------------------------------------------------------------- /Elevator/Materials/d_ExternalFloorDoors.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_ExternalFloorDoors 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: 3000 14 | stringTagMap: 15 | RenderType: Transparent 16 | m_SavedProperties: 17 | serializedVersion: 2 18 | m_TexEnvs: 19 | - first: 20 | name: _BumpMap 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - first: 26 | name: _DetailAlbedoMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - first: 32 | name: _DetailMask 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - first: 38 | name: _DetailNormalMap 39 | second: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - first: 44 | name: _EmissionMap 45 | second: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - first: 50 | name: _MainTex 51 | second: 52 | m_Texture: {fileID: 2800000, guid: edac1a49f35ba8e4d913fc742457f1bf, type: 3} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - first: 56 | name: _MetallicGlossMap 57 | second: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - first: 62 | name: _OcclusionMap 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - first: 68 | name: _ParallaxMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | m_Floats: 74 | - first: 75 | name: _BumpScale 76 | second: 1 77 | - first: 78 | name: _Cutoff 79 | second: 0.5 80 | - first: 81 | name: _DetailNormalMapScale 82 | second: 1 83 | - first: 84 | name: _DstBlend 85 | second: 10 86 | - first: 87 | name: _GlossMapScale 88 | second: 1 89 | - first: 90 | name: _Glossiness 91 | second: 0 92 | - first: 93 | name: _GlossyReflections 94 | second: 0 95 | - first: 96 | name: _Metallic 97 | second: 0 98 | - first: 99 | name: _Mode 100 | second: 2 101 | - first: 102 | name: _OcclusionStrength 103 | second: 1 104 | - first: 105 | name: _Parallax 106 | second: 0.02 107 | - first: 108 | name: _SmoothnessTextureChannel 109 | second: 0 110 | - first: 111 | name: _SpecularHighlights 112 | second: 0 113 | - first: 114 | name: _SrcBlend 115 | second: 5 116 | - first: 117 | name: _UVSec 118 | second: 0 119 | - first: 120 | name: _ZWrite 121 | second: 0 122 | m_Colors: 123 | - first: 124 | name: _Color 125 | second: {r: 1, g: 1, b: 1, a: 0.753} 126 | - first: 127 | name: _EmissionColor 128 | second: {r: 0, g: 0, b: 0, a: 1} 129 | -------------------------------------------------------------------------------- /Elevator/Materials/d_buttonDown.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_buttonDown 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: 1994431809c12854fa02999f584b65ff, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_buttonUp.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_buttonUp 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: affd20185345bea4984aaa157ecc547a, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_elevatorMetal.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_elevatorMetal 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: edac1a49f35ba8e4d913fc742457f1bf, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_floor1.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_floor1 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: 3ab04c614c9b4aa42bf5eb6189033b08, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_floor2.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_floor2 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: 5cd3a891c64174e408461dedbef39cea, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_floor3.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_floor3 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BumpMap 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _DetailAlbedoMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _DetailMask 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DetailNormalMap 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _EmissionMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _MainTex 50 | second: 51 | m_Texture: {fileID: 2800000, guid: 5d6ec5805b616434b9e1e6100bc4817f, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _MetallicGlossMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _OcclusionMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _ParallaxMap 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | m_Floats: 73 | - first: 74 | name: _BumpScale 75 | second: 1 76 | - first: 77 | name: _Cutoff 78 | second: 0.5 79 | - first: 80 | name: _DetailNormalMapScale 81 | second: 1 82 | - first: 83 | name: _DstBlend 84 | second: 0 85 | - first: 86 | name: _GlossMapScale 87 | second: 1 88 | - first: 89 | name: _Glossiness 90 | second: 0 91 | - first: 92 | name: _GlossyReflections 93 | second: 0 94 | - first: 95 | name: _Metallic 96 | second: 0 97 | - first: 98 | name: _Mode 99 | second: 0 100 | - first: 101 | name: _OcclusionStrength 102 | second: 1 103 | - first: 104 | name: _Parallax 105 | second: 0.02 106 | - first: 107 | name: _SmoothnessTextureChannel 108 | second: 0 109 | - first: 110 | name: _SpecularHighlights 111 | second: 0 112 | - first: 113 | name: _SrcBlend 114 | second: 1 115 | - first: 116 | name: _UVSec 117 | second: 0 118 | - first: 119 | name: _ZWrite 120 | second: 1 121 | m_Colors: 122 | - first: 123 | name: _Color 124 | second: {r: 1, g: 1, b: 1, a: 1} 125 | - first: 126 | name: _EmissionColor 127 | second: {r: 0, g: 0, b: 0, a: 1} 128 | -------------------------------------------------------------------------------- /Elevator/Materials/d_playerBlocker.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: d_playerBlocker 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: 3000 14 | stringTagMap: 15 | RenderType: Transparent 16 | m_SavedProperties: 17 | serializedVersion: 2 18 | m_TexEnvs: 19 | - first: 20 | name: _BumpMap 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - first: 26 | name: _DetailAlbedoMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - first: 32 | name: _DetailMask 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - first: 38 | name: _DetailNormalMap 39 | second: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - first: 44 | name: _EmissionMap 45 | second: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - first: 50 | name: _MainTex 51 | second: 52 | m_Texture: {fileID: 2800000, guid: 962188071eb5764468234a191f0801cd, type: 3} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - first: 56 | name: _MetallicGlossMap 57 | second: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - first: 62 | name: _OcclusionMap 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - first: 68 | name: _ParallaxMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | m_Floats: 74 | - first: 75 | name: _BumpScale 76 | second: 1 77 | - first: 78 | name: _Cutoff 79 | second: 0.5 80 | - first: 81 | name: _DetailNormalMapScale 82 | second: 1 83 | - first: 84 | name: _DstBlend 85 | second: 10 86 | - first: 87 | name: _GlossMapScale 88 | second: 1 89 | - first: 90 | name: _Glossiness 91 | second: 0 92 | - first: 93 | name: _GlossyReflections 94 | second: 0 95 | - first: 96 | name: _Metallic 97 | second: 0 98 | - first: 99 | name: _Mode 100 | second: 2 101 | - first: 102 | name: _OcclusionStrength 103 | second: 1 104 | - first: 105 | name: _Parallax 106 | second: 0.02 107 | - first: 108 | name: _SmoothnessTextureChannel 109 | second: 0 110 | - first: 111 | name: _SpecularHighlights 112 | second: 0 113 | - first: 114 | name: _SrcBlend 115 | second: 5 116 | - first: 117 | name: _UVSec 118 | second: 0 119 | - first: 120 | name: _ZWrite 121 | second: 0 122 | m_Colors: 123 | - first: 124 | name: _Color 125 | second: {r: 1, g: 1, b: 1, a: 0.628} 126 | - first: 127 | name: _EmissionColor 128 | second: {r: 0, g: 0, b: 0, a: 1} 129 | -------------------------------------------------------------------------------- /Elevator/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity v5.5.4p3+ 2 | FPEKit v2.0.2 3 | -------------------------------------------------------------------------------- /Elevator/Scripts/ElevatorButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // 4 | // ElevatorButton 5 | // This script acts as a bridge between buttons in any scene and a given instance of 6 | // ElevatorController. This is required as the elevator buttons to call the elevator 7 | // to a given floor might be loaded after ElevatorController, so a direct Inspector 8 | // reference assignment won't be reliable. 9 | // 10 | // Copyright 2017 While Fun Games 11 | // http://whilefun.com 12 | // 13 | public class ElevatorButton : MonoBehaviour { 14 | 15 | public void CallElevator(int floorIndex) 16 | { 17 | ElevatorController.Instance.CallToFloor(floorIndex); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Elevator/Scripts/ElevatorController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | using Whilefun.FPEKit; 4 | 5 | // 6 | // ElevatorController 7 | // This script contains a state machine and associated logic to allow for levels to be loaded 8 | // through elevator movement rather than hallways or doors. The ElevatorController prefab is a 9 | // special object that lives in all scenes, and is always loaded. 10 | // 11 | // Copyright 2017 While Fun Games 12 | // http://whilefun.com 13 | // 14 | public class ElevatorController : MonoBehaviour { 15 | 16 | private static ElevatorController _instance; 17 | public static ElevatorController Instance { 18 | get { return _instance; } 19 | } 20 | 21 | public enum eElevatorState 22 | { 23 | STOPPED = 0, 24 | MOVING = 1, 25 | }; 26 | private eElevatorState currentElevatorState = eElevatorState.STOPPED; 27 | 28 | [SerializeField, Tooltip("The main moving body of the elevator")] 29 | private GameObject elevatorPlatform; 30 | 31 | [SerializeField, Tooltip("The player-blocking door. Prevents player from leaving elevator when its in motion")] 32 | private GameObject elevatorDoor; 33 | 34 | [SerializeField, Tooltip("The external doors that block player from falling into elevator shaft")] 35 | private GameObject[] elevatorFloorDoors; 36 | 37 | [SerializeField, Tooltip("The FPEDoorway objects that act as level loading triggers in the shaft")] 38 | private GameObject[] floorDoorways; 39 | 40 | [SerializeField, Tooltip("the Y locations for each floor. The elevator stops at these heights for each floor.")] 41 | private Transform[] floorLocations; 42 | 43 | private int currentFloorIndex = 0; 44 | private int targetFloorIndex = 0; 45 | 46 | // Movement 47 | [SerializeField, Tooltip("The rate the elevator moves up and down. Default is (0,1,0)")] 48 | private Vector3 defaultElevatorMovement = new Vector3(0f, 1f, 0f); 49 | private Vector3 currentElevatorMovement = new Vector3(0f, 1f, 0f); 50 | private float floorSnapDistance = 0.1f; 51 | 52 | // Sound for elevator ding 53 | [SerializeField] 54 | private AudioSource mySpeaker; 55 | 56 | void Awake() 57 | { 58 | 59 | if (_instance != null) 60 | { 61 | Debug.LogWarning("ElevatorController:: Duplicate instance of ElevatorController, deleting second one."); 62 | Destroy(this.gameObject); 63 | } 64 | else 65 | { 66 | _instance = this; 67 | DontDestroyOnLoad(this.gameObject); 68 | } 69 | 70 | } 71 | 72 | void Start () 73 | { 74 | 75 | if(floorLocations.Length != floorDoorways.Length || floorLocations.Length != elevatorFloorDoors.Length) 76 | { 77 | Debug.LogError("ElevatorController:: There are a different number of floor locations ("+ floorLocations.Length + "), floor doors ("+ elevatorFloorDoors.Length + "), or floor doorways (" + floorDoorways.Length + "). Some of your floors won't work as expected."); 78 | } 79 | 80 | // Always disable all doorways at start of scene 81 | deactivateAllDoorways(); 82 | 83 | } 84 | 85 | void Update () 86 | { 87 | 88 | if (currentElevatorState == eElevatorState.MOVING) 89 | { 90 | 91 | elevatorPlatform.transform.Translate(currentElevatorMovement * Time.deltaTime); 92 | 93 | // Moving Up 94 | if(currentElevatorMovement.y > 0) 95 | { 96 | 97 | if((Mathf.Abs(elevatorPlatform.transform.position.y - floorLocations[targetFloorIndex].transform.position.y) < floorSnapDistance) || (elevatorPlatform.transform.position.y > floorLocations[targetFloorIndex].transform.position.y)) 98 | { 99 | stopElevatorAtDestination(); 100 | } 101 | 102 | } 103 | // Moving Down 104 | else if (currentElevatorMovement.y < 0) 105 | { 106 | 107 | if ((Mathf.Abs(elevatorPlatform.transform.position.y - floorLocations[targetFloorIndex].transform.position.y) < floorSnapDistance) || (elevatorPlatform.transform.position.y < floorLocations[targetFloorIndex].transform.position.y)) 108 | { 109 | stopElevatorAtDestination(); 110 | } 111 | 112 | } 113 | 114 | } 115 | 116 | #region DEBUG_KEYS 117 | 118 | if (Input.GetKeyDown(KeyCode.RightBracket)) 119 | { 120 | Debug.Log("ElevatorController:: Debug Move Up 1 floor"); 121 | MoveToFloor(Mathf.Min(floorLocations.Length,currentFloorIndex + 1)); 122 | } 123 | 124 | if (Input.GetKeyDown(KeyCode.LeftBracket)) 125 | { 126 | Debug.Log("ElevatorController:: Debug Move Down 1 floor"); 127 | MoveToFloor(Mathf.Max(0, currentFloorIndex - 1)); 128 | } 129 | 130 | if (Input.GetKeyDown(KeyCode.M)) 131 | { 132 | Debug.Log("ElevatorController:: Debug Call Elevator to Main floor"); 133 | CallToFloor(0); 134 | } 135 | #endregion 136 | 137 | 138 | } 139 | 140 | /// 141 | /// Moves the elevator to destination floor. Called by button inside the elevator. 142 | /// 143 | public void MoveToFloor(int floorIndex) 144 | { 145 | 146 | Debug.Log("ElevatorController:: Move requested to floor index " + floorIndex); 147 | 148 | if (currentElevatorState == eElevatorState.STOPPED && currentFloorIndex != floorIndex) 149 | { 150 | 151 | currentElevatorState = eElevatorState.MOVING; 152 | targetFloorIndex = floorIndex; 153 | 154 | if(targetFloorIndex > currentFloorIndex) 155 | { 156 | currentElevatorMovement = defaultElevatorMovement; 157 | } 158 | else 159 | { 160 | currentElevatorMovement = -defaultElevatorMovement; 161 | } 162 | 163 | closeExternalFloorDoors(); 164 | closeDoor(); 165 | grabPlayer(); 166 | 167 | deactivateAllDoorways(); 168 | 169 | // We must activate the scene changing FPEDoorway so that the scene will change as we approach our desired floor. 170 | activateFloorDoorway(targetFloorIndex); 171 | 172 | } 173 | 174 | } 175 | 176 | /// 177 | /// Calls elevator to floor. Used by button outside elevator. 178 | /// 179 | public void CallToFloor(int floorIndex) 180 | { 181 | 182 | Debug.Log("ElevatorController:: Called to floor index " + floorIndex); 183 | 184 | elevatorPlatform.transform.position = floorLocations[floorIndex].transform.position; 185 | currentElevatorState = eElevatorState.STOPPED; 186 | currentFloorIndex = floorIndex; 187 | targetFloorIndex = floorIndex; 188 | 189 | openExternalFloorDoor(currentFloorIndex); 190 | openDoor(); 191 | mySpeaker.Play(); 192 | 193 | } 194 | 195 | /// 196 | /// This ensures that the player will move smoothly with the elevator platform as it moves to a new floor. 197 | /// 198 | private void grabPlayer() 199 | { 200 | FPEPlayer.Instance.gameObject.transform.parent = elevatorPlatform.transform; 201 | } 202 | 203 | /// 204 | /// Does the opposite of grabPlayer(), and allows the player and elevator to move independently again. 205 | /// 206 | private void releasePlayer() 207 | { 208 | FPEPlayer.Instance.gameObject.transform.parent = null; 209 | } 210 | 211 | /// 212 | /// Turns off all FPEDoorway objects so that we don't load the wrong floor. For example, if moving from floor 1 to 213 | /// floor 3, we must move past floor 2. But if floor 2's doorway was still active we'd load in floor 2's scene as we 214 | /// moved past it, which is inefficient. 215 | /// 216 | private void deactivateAllDoorways() 217 | { 218 | 219 | for (int f = 0; f < floorDoorways.Length; f++) 220 | { 221 | floorDoorways[f].SetActive(false); 222 | } 223 | 224 | } 225 | 226 | /// 227 | /// Activates desitination floor's level loading FPEDoorway game object so the 228 | /// destination level is loaded when we approach it. 229 | /// 230 | private void activateFloorDoorway(int floorIndex) 231 | { 232 | 233 | floorDoorways[floorIndex].SetActive(true); 234 | 235 | // Extra step: By default, FPEDoorways live in each loaded scene. But in this case, the doorways live 236 | // in the Elevator shaft. So when a level is loaded, we must manually re-enable the doorway's BoxCollider 237 | // since it gets disabled internally to FPEDoorway after the player touches it. 238 | floorDoorways[floorIndex].gameObject.GetComponent().enabled = true; 239 | 240 | } 241 | 242 | // 243 | // Currently the openDoor(), closeDoor(), openExternalFloorDoor(), and closeExternalFloorDoors() functions just 244 | // toggle the cube on and off. You can make the cube mesh invisible and have a fancy door animation in addition to 245 | // this cube, but the cube will keep the player from walking out of the elevator while its in motion or falling 246 | // into the elevator shaft if the elevator is not at their current floor. 247 | // 248 | private void openDoor() 249 | { 250 | elevatorDoor.SetActive(false); 251 | } 252 | 253 | private void closeDoor() 254 | { 255 | elevatorDoor.SetActive(true); 256 | } 257 | 258 | private void openExternalFloorDoor(int floorIndex) 259 | { 260 | elevatorFloorDoors[floorIndex].SetActive(false); 261 | } 262 | 263 | private void closeExternalFloorDoors() 264 | { 265 | for(int f = 0; f < elevatorFloorDoors.Length; f++) 266 | { 267 | elevatorFloorDoors[f].SetActive(true); 268 | } 269 | } 270 | 271 | private void stopElevatorAtDestination() 272 | { 273 | 274 | elevatorPlatform.transform.position = floorLocations[targetFloorIndex].transform.position; 275 | currentElevatorState = eElevatorState.STOPPED; 276 | currentFloorIndex = targetFloorIndex; 277 | 278 | deactivateAllDoorways(); 279 | releasePlayer(); 280 | openExternalFloorDoor(currentFloorIndex); 281 | openDoor(); 282 | 283 | mySpeaker.Play(); 284 | 285 | } 286 | 287 | 288 | /// 289 | /// Strictly for visual reference and debug purposes 290 | /// 291 | private void OnDrawGizmos() 292 | { 293 | 294 | Color c = Color.red; 295 | 296 | if (floorLocations != null) 297 | { 298 | 299 | c.a = 0.5f; 300 | Gizmos.color = c; 301 | 302 | for(int i = 0; i < floorLocations.Length; i++) 303 | { 304 | //Gizmos.DrawWireCube(floorLocations[i].position, Vector3.one * 0.6f); 305 | Gizmos.DrawCube(floorLocations[i].position, Vector3.one * 0.6f); 306 | } 307 | 308 | c = Color.green; 309 | Gizmos.color = c; 310 | 311 | //Gizmos.DrawWireCube(floorLocations[targetFloorIndex].position, Vector3.one * 0.6f); 312 | Gizmos.DrawWireCube(floorLocations[targetFloorIndex].position, Vector3.one * 0.6f); 313 | 314 | } 315 | 316 | } 317 | 318 | } 319 | -------------------------------------------------------------------------------- /Elevator/Textures/d_buttonDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_buttonDown.png -------------------------------------------------------------------------------- /Elevator/Textures/d_buttonUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_buttonUp.png -------------------------------------------------------------------------------- /Elevator/Textures/d_elevatorMetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_elevatorMetal.png -------------------------------------------------------------------------------- /Elevator/Textures/d_floor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_floor1.png -------------------------------------------------------------------------------- /Elevator/Textures/d_floor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_floor2.png -------------------------------------------------------------------------------- /Elevator/Textures/d_floor3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_floor3.png -------------------------------------------------------------------------------- /Elevator/Textures/d_playerBlocker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Elevator/Textures/d_playerBlocker.png -------------------------------------------------------------------------------- /FPEKitCinemachine/CinemachineCut.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/FPEKitCinemachine/CinemachineCut.gif -------------------------------------------------------------------------------- /FPEKitCinemachine/Documentation/README.txt: -------------------------------------------------------------------------------- 1 | Steps: 2 | ----- 3 | 1) Open FPEPlayerController prefab prefab, and add a Cinemachine External Camera component to the MainCamera child object of the prefab 4 | 2) Apply changes to the prefab 5 | 3) Create an empty GameObject and name it CM_Brain 6 | 4) Add a Cinemachine Brain component to CM_Brain. Change Default blend to Cut. 7 | 5) Create an empty GameObject and name it CM_CutsceneCamera_01 8 | 6) Add a Camera to CM_CutsceneCamera_01 9 | 7) Add a Cinemachine Virtual Camera component to CM_CutsceneCamera_01. Change the Aim to Hard Look At. 10 | 8) Create a Cube, name it CM_CutsceneTrigger_01. Set the Is Trigger value of the Box Collider is true (check the "Is Trigger" box). 11 | 9) Add the CutsceneTrigger script to CM_CutsceneTrigger_01. 12 | 10) Drag a reference to CM_CutsceneCamera_01 into the Camera To Trigger field of the CM_CutsceneTrigger_01's CutsceneTrigger script. 13 | 14 | Run the scene. Walk into the cube and the camera view will cut to the cutscene camera for the time specified, then cut back to first person view. 15 | 16 | From here you can get as fancy as you want with the full power of Cinemachine :) -------------------------------------------------------------------------------- /FPEKitCinemachine/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity v2018.1.0f2 2 | Cinemachine v2.1.10 3 | FPEKit v2.0.2 4 | -------------------------------------------------------------------------------- /FPEKitCinemachine/Scenes/TestCutscene.unity: -------------------------------------------------------------------------------- 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: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 1 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 40 61 | m_AtlasSize: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1001 &131099818 117 | Prefab: 118 | m_ObjectHideFlags: 0 119 | serializedVersion: 2 120 | m_Modification: 121 | m_TransformParent: {fileID: 0} 122 | m_Modifications: 123 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 124 | propertyPath: m_LocalPosition.x 125 | value: 0 126 | objectReference: {fileID: 0} 127 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 128 | propertyPath: m_LocalPosition.y 129 | value: 0 130 | objectReference: {fileID: 0} 131 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 132 | propertyPath: m_LocalPosition.z 133 | value: 0 134 | objectReference: {fileID: 0} 135 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 136 | propertyPath: m_LocalRotation.x 137 | value: 0 138 | objectReference: {fileID: 0} 139 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 140 | propertyPath: m_LocalRotation.y 141 | value: 0 142 | objectReference: {fileID: 0} 143 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 144 | propertyPath: m_LocalRotation.z 145 | value: 0 146 | objectReference: {fileID: 0} 147 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 148 | propertyPath: m_LocalRotation.w 149 | value: 1 150 | objectReference: {fileID: 0} 151 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 152 | propertyPath: m_RootOrder 153 | value: 0 154 | objectReference: {fileID: 0} 155 | m_RemovedComponents: [] 156 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 157 | m_IsPrefabParent: 0 158 | --- !u!1 &686371863 159 | GameObject: 160 | m_ObjectHideFlags: 0 161 | m_PrefabParentObject: {fileID: 0} 162 | m_PrefabInternal: {fileID: 0} 163 | serializedVersion: 5 164 | m_Component: 165 | - component: {fileID: 686371865} 166 | - component: {fileID: 686371866} 167 | - component: {fileID: 686371864} 168 | m_Layer: 0 169 | m_Name: CM_CutsceneCamera_01 170 | m_TagString: Untagged 171 | m_Icon: {fileID: 0} 172 | m_NavMeshLayer: 0 173 | m_StaticEditorFlags: 0 174 | m_IsActive: 1 175 | --- !u!114 &686371864 176 | MonoBehaviour: 177 | m_ObjectHideFlags: 0 178 | m_PrefabParentObject: {fileID: 0} 179 | m_PrefabInternal: {fileID: 0} 180 | m_GameObject: {fileID: 686371863} 181 | m_Enabled: 1 182 | m_EditorHideFlags: 0 183 | m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3} 184 | m_Name: 185 | m_EditorClassIdentifier: 186 | m_ExcludedPropertiesInInspector: 187 | - m_Script 188 | m_LockStageInInspector: 189 | m_StreamingVersion: 20170927 190 | m_Priority: 10 191 | m_LookAt: {fileID: 0} 192 | m_Follow: {fileID: 0} 193 | m_Lens: 194 | FieldOfView: 40 195 | OrthographicSize: 10 196 | NearClipPlane: 0.1 197 | FarClipPlane: 5000 198 | Dutch: 0 199 | m_ComponentOwner: {fileID: 1980900627} 200 | --- !u!4 &686371865 201 | Transform: 202 | m_ObjectHideFlags: 0 203 | m_PrefabParentObject: {fileID: 0} 204 | m_PrefabInternal: {fileID: 0} 205 | m_GameObject: {fileID: 686371863} 206 | m_LocalRotation: {x: 0.14076398, y: 0.32357737, z: -0.048745643, w: 0.93440205} 207 | m_LocalPosition: {x: -4.99, y: 2.94, z: -4.96} 208 | m_LocalScale: {x: 1, y: 1, z: 1} 209 | m_Children: 210 | - {fileID: 1980900627} 211 | m_Father: {fileID: 0} 212 | m_RootOrder: 5 213 | m_LocalEulerAnglesHint: {x: 17.134, y: 38.201, z: 0} 214 | --- !u!20 &686371866 215 | Camera: 216 | m_ObjectHideFlags: 0 217 | m_PrefabParentObject: {fileID: 0} 218 | m_PrefabInternal: {fileID: 0} 219 | m_GameObject: {fileID: 686371863} 220 | m_Enabled: 1 221 | serializedVersion: 2 222 | m_ClearFlags: 1 223 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 224 | m_NormalizedViewPortRect: 225 | serializedVersion: 2 226 | x: 0 227 | y: 0 228 | width: 1 229 | height: 1 230 | near clip plane: 0.3 231 | far clip plane: 1000 232 | field of view: 60 233 | orthographic: 0 234 | orthographic size: 5 235 | m_Depth: 0 236 | m_CullingMask: 237 | serializedVersion: 2 238 | m_Bits: 4294967295 239 | m_RenderingPath: -1 240 | m_TargetTexture: {fileID: 0} 241 | m_TargetDisplay: 0 242 | m_TargetEye: 3 243 | m_HDR: 1 244 | m_AllowMSAA: 1 245 | m_AllowDynamicResolution: 0 246 | m_ForceIntoRT: 0 247 | m_OcclusionCulling: 1 248 | m_StereoConvergence: 10 249 | m_StereoSeparation: 0.022 250 | --- !u!1 &727508355 251 | GameObject: 252 | m_ObjectHideFlags: 0 253 | m_PrefabParentObject: {fileID: 0} 254 | m_PrefabInternal: {fileID: 0} 255 | serializedVersion: 5 256 | m_Component: 257 | - component: {fileID: 727508359} 258 | - component: {fileID: 727508358} 259 | - component: {fileID: 727508357} 260 | - component: {fileID: 727508356} 261 | m_Layer: 0 262 | m_Name: Floor 263 | m_TagString: Untagged 264 | m_Icon: {fileID: 0} 265 | m_NavMeshLayer: 0 266 | m_StaticEditorFlags: 0 267 | m_IsActive: 1 268 | --- !u!64 &727508356 269 | MeshCollider: 270 | m_ObjectHideFlags: 0 271 | m_PrefabParentObject: {fileID: 0} 272 | m_PrefabInternal: {fileID: 0} 273 | m_GameObject: {fileID: 727508355} 274 | m_Material: {fileID: 0} 275 | m_IsTrigger: 0 276 | m_Enabled: 1 277 | serializedVersion: 3 278 | m_Convex: 0 279 | m_CookingOptions: 14 280 | m_SkinWidth: 0.01 281 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 282 | --- !u!23 &727508357 283 | MeshRenderer: 284 | m_ObjectHideFlags: 0 285 | m_PrefabParentObject: {fileID: 0} 286 | m_PrefabInternal: {fileID: 0} 287 | m_GameObject: {fileID: 727508355} 288 | m_Enabled: 1 289 | m_CastShadows: 1 290 | m_ReceiveShadows: 1 291 | m_DynamicOccludee: 1 292 | m_MotionVectors: 1 293 | m_LightProbeUsage: 1 294 | m_ReflectionProbeUsage: 1 295 | m_RenderingLayerMask: 4294967295 296 | m_Materials: 297 | - {fileID: 2100000, guid: f2521483140fd684cb25837dd618e4d5, type: 2} 298 | m_StaticBatchInfo: 299 | firstSubMesh: 0 300 | subMeshCount: 0 301 | m_StaticBatchRoot: {fileID: 0} 302 | m_ProbeAnchor: {fileID: 0} 303 | m_LightProbeVolumeOverride: {fileID: 0} 304 | m_ScaleInLightmap: 1 305 | m_PreserveUVs: 0 306 | m_IgnoreNormalsForChartDetection: 0 307 | m_ImportantGI: 0 308 | m_StitchLightmapSeams: 0 309 | m_SelectedEditorRenderState: 3 310 | m_MinimumChartSize: 4 311 | m_AutoUVMaxDistance: 0.5 312 | m_AutoUVMaxAngle: 89 313 | m_LightmapParameters: {fileID: 0} 314 | m_SortingLayerID: 0 315 | m_SortingLayer: 0 316 | m_SortingOrder: 0 317 | --- !u!33 &727508358 318 | MeshFilter: 319 | m_ObjectHideFlags: 0 320 | m_PrefabParentObject: {fileID: 0} 321 | m_PrefabInternal: {fileID: 0} 322 | m_GameObject: {fileID: 727508355} 323 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 324 | --- !u!4 &727508359 325 | Transform: 326 | m_ObjectHideFlags: 0 327 | m_PrefabParentObject: {fileID: 0} 328 | m_PrefabInternal: {fileID: 0} 329 | m_GameObject: {fileID: 727508355} 330 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 331 | m_LocalPosition: {x: 0, y: 0, z: 0} 332 | m_LocalScale: {x: 5, y: 5, z: 5} 333 | m_Children: [] 334 | m_Father: {fileID: 0} 335 | m_RootOrder: 2 336 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 337 | --- !u!1 &806748266 338 | GameObject: 339 | m_ObjectHideFlags: 0 340 | m_PrefabParentObject: {fileID: 0} 341 | m_PrefabInternal: {fileID: 0} 342 | serializedVersion: 5 343 | m_Component: 344 | - component: {fileID: 806748271} 345 | - component: {fileID: 806748270} 346 | - component: {fileID: 806748269} 347 | - component: {fileID: 806748268} 348 | - component: {fileID: 806748267} 349 | m_Layer: 0 350 | m_Name: CM_CutsceneTrigger_01 351 | m_TagString: Untagged 352 | m_Icon: {fileID: 0} 353 | m_NavMeshLayer: 0 354 | m_StaticEditorFlags: 0 355 | m_IsActive: 1 356 | --- !u!114 &806748267 357 | MonoBehaviour: 358 | m_ObjectHideFlags: 0 359 | m_PrefabParentObject: {fileID: 0} 360 | m_PrefabInternal: {fileID: 0} 361 | m_GameObject: {fileID: 806748266} 362 | m_Enabled: 1 363 | m_EditorHideFlags: 0 364 | m_Script: {fileID: 11500000, guid: 8c5dacd75e0957648ab2f09fec19ed14, type: 3} 365 | m_Name: 366 | m_EditorClassIdentifier: 367 | cameraToTrigger: {fileID: 686371864} 368 | cameraCutDuration: 3 369 | --- !u!65 &806748268 370 | BoxCollider: 371 | m_ObjectHideFlags: 0 372 | m_PrefabParentObject: {fileID: 0} 373 | m_PrefabInternal: {fileID: 0} 374 | m_GameObject: {fileID: 806748266} 375 | m_Material: {fileID: 0} 376 | m_IsTrigger: 1 377 | m_Enabled: 1 378 | serializedVersion: 2 379 | m_Size: {x: 1, y: 1, z: 1} 380 | m_Center: {x: 0, y: 0, z: 0} 381 | --- !u!23 &806748269 382 | MeshRenderer: 383 | m_ObjectHideFlags: 0 384 | m_PrefabParentObject: {fileID: 0} 385 | m_PrefabInternal: {fileID: 0} 386 | m_GameObject: {fileID: 806748266} 387 | m_Enabled: 1 388 | m_CastShadows: 1 389 | m_ReceiveShadows: 1 390 | m_DynamicOccludee: 1 391 | m_MotionVectors: 1 392 | m_LightProbeUsage: 1 393 | m_ReflectionProbeUsage: 1 394 | m_RenderingLayerMask: 4294967295 395 | m_Materials: 396 | - {fileID: 2100000, guid: cfed4235966a9c649b55315a192e704c, type: 2} 397 | m_StaticBatchInfo: 398 | firstSubMesh: 0 399 | subMeshCount: 0 400 | m_StaticBatchRoot: {fileID: 0} 401 | m_ProbeAnchor: {fileID: 0} 402 | m_LightProbeVolumeOverride: {fileID: 0} 403 | m_ScaleInLightmap: 1 404 | m_PreserveUVs: 0 405 | m_IgnoreNormalsForChartDetection: 0 406 | m_ImportantGI: 0 407 | m_StitchLightmapSeams: 0 408 | m_SelectedEditorRenderState: 3 409 | m_MinimumChartSize: 4 410 | m_AutoUVMaxDistance: 0.5 411 | m_AutoUVMaxAngle: 89 412 | m_LightmapParameters: {fileID: 0} 413 | m_SortingLayerID: 0 414 | m_SortingLayer: 0 415 | m_SortingOrder: 0 416 | --- !u!33 &806748270 417 | MeshFilter: 418 | m_ObjectHideFlags: 0 419 | m_PrefabParentObject: {fileID: 0} 420 | m_PrefabInternal: {fileID: 0} 421 | m_GameObject: {fileID: 806748266} 422 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 423 | --- !u!4 &806748271 424 | Transform: 425 | m_ObjectHideFlags: 0 426 | m_PrefabParentObject: {fileID: 0} 427 | m_PrefabInternal: {fileID: 0} 428 | m_GameObject: {fileID: 806748266} 429 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 430 | m_LocalPosition: {x: -0.43026447, y: 0.86002684, z: 4.84} 431 | m_LocalScale: {x: 1, y: 1, z: 1} 432 | m_Children: [] 433 | m_Father: {fileID: 0} 434 | m_RootOrder: 4 435 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 436 | --- !u!1 &978962516 437 | GameObject: 438 | m_ObjectHideFlags: 0 439 | m_PrefabParentObject: {fileID: 0} 440 | m_PrefabInternal: {fileID: 0} 441 | serializedVersion: 5 442 | m_Component: 443 | - component: {fileID: 978962518} 444 | - component: {fileID: 978962517} 445 | m_Layer: 0 446 | m_Name: Directional Light 447 | m_TagString: Untagged 448 | m_Icon: {fileID: 0} 449 | m_NavMeshLayer: 0 450 | m_StaticEditorFlags: 0 451 | m_IsActive: 1 452 | --- !u!108 &978962517 453 | Light: 454 | m_ObjectHideFlags: 0 455 | m_PrefabParentObject: {fileID: 0} 456 | m_PrefabInternal: {fileID: 0} 457 | m_GameObject: {fileID: 978962516} 458 | m_Enabled: 1 459 | serializedVersion: 8 460 | m_Type: 1 461 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 462 | m_Intensity: 1 463 | m_Range: 10 464 | m_SpotAngle: 30 465 | m_CookieSize: 10 466 | m_Shadows: 467 | m_Type: 2 468 | m_Resolution: -1 469 | m_CustomResolution: -1 470 | m_Strength: 1 471 | m_Bias: 0.05 472 | m_NormalBias: 0.4 473 | m_NearPlane: 0.2 474 | m_Cookie: {fileID: 0} 475 | m_DrawHalo: 0 476 | m_Flare: {fileID: 0} 477 | m_RenderMode: 0 478 | m_CullingMask: 479 | serializedVersion: 2 480 | m_Bits: 4294967295 481 | m_Lightmapping: 4 482 | m_AreaSize: {x: 1, y: 1} 483 | m_BounceIntensity: 1 484 | m_ColorTemperature: 6570 485 | m_UseColorTemperature: 0 486 | m_ShadowRadius: 0 487 | m_ShadowAngle: 0 488 | --- !u!4 &978962518 489 | Transform: 490 | m_ObjectHideFlags: 0 491 | m_PrefabParentObject: {fileID: 0} 492 | m_PrefabInternal: {fileID: 0} 493 | m_GameObject: {fileID: 978962516} 494 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 495 | m_LocalPosition: {x: 0, y: 3, z: 0} 496 | m_LocalScale: {x: 1, y: 1, z: 1} 497 | m_Children: [] 498 | m_Father: {fileID: 0} 499 | m_RootOrder: 1 500 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 501 | --- !u!1 &1131327205 502 | GameObject: 503 | m_ObjectHideFlags: 0 504 | m_PrefabParentObject: {fileID: 0} 505 | m_PrefabInternal: {fileID: 0} 506 | serializedVersion: 5 507 | m_Component: 508 | - component: {fileID: 1131327207} 509 | - component: {fileID: 1131327206} 510 | m_Layer: 0 511 | m_Name: CM_Brain 512 | m_TagString: Untagged 513 | m_Icon: {fileID: 0} 514 | m_NavMeshLayer: 0 515 | m_StaticEditorFlags: 0 516 | m_IsActive: 1 517 | --- !u!114 &1131327206 518 | MonoBehaviour: 519 | m_ObjectHideFlags: 0 520 | m_PrefabParentObject: {fileID: 0} 521 | m_PrefabInternal: {fileID: 0} 522 | m_GameObject: {fileID: 1131327205} 523 | m_Enabled: 1 524 | m_EditorHideFlags: 0 525 | m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3} 526 | m_Name: 527 | m_EditorClassIdentifier: 528 | m_ShowDebugText: 0 529 | m_ShowCameraFrustum: 1 530 | m_IgnoreTimeScale: 0 531 | m_WorldUpOverride: {fileID: 0} 532 | m_UpdateMethod: 2 533 | m_DefaultBlend: 534 | m_Style: 0 535 | m_Time: 2 536 | m_CustomBlends: {fileID: 0} 537 | m_CameraCutEvent: 538 | m_PersistentCalls: 539 | m_Calls: [] 540 | m_TypeName: Cinemachine.CinemachineBrain+BrainEvent, Assembly-CSharp, Version=0.0.0.0, 541 | Culture=neutral, PublicKeyToken=null 542 | m_CameraActivatedEvent: 543 | m_PersistentCalls: 544 | m_Calls: [] 545 | m_TypeName: Cinemachine.CinemachineBrain+VcamEvent, Assembly-CSharp, Version=0.0.0.0, 546 | Culture=neutral, PublicKeyToken=null 547 | --- !u!4 &1131327207 548 | Transform: 549 | m_ObjectHideFlags: 0 550 | m_PrefabParentObject: {fileID: 0} 551 | m_PrefabInternal: {fileID: 0} 552 | m_GameObject: {fileID: 1131327205} 553 | m_LocalRotation: {x: 0.14076398, y: 0.32357737, z: -0.048745643, w: 0.93440205} 554 | m_LocalPosition: {x: -4.99, y: 2.94, z: -4.96} 555 | m_LocalScale: {x: 1, y: 1, z: 1} 556 | m_Children: [] 557 | m_Father: {fileID: 0} 558 | m_RootOrder: 3 559 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 560 | --- !u!1 &1980900626 561 | GameObject: 562 | m_ObjectHideFlags: 3 563 | m_PrefabParentObject: {fileID: 0} 564 | m_PrefabInternal: {fileID: 0} 565 | serializedVersion: 5 566 | m_Component: 567 | - component: {fileID: 1980900627} 568 | - component: {fileID: 1980900628} 569 | - component: {fileID: 1980900630} 570 | - component: {fileID: 1980900629} 571 | m_Layer: 0 572 | m_Name: cm 573 | m_TagString: Untagged 574 | m_Icon: {fileID: 0} 575 | m_NavMeshLayer: 0 576 | m_StaticEditorFlags: 0 577 | m_IsActive: 1 578 | --- !u!4 &1980900627 579 | Transform: 580 | m_ObjectHideFlags: 3 581 | m_PrefabParentObject: {fileID: 0} 582 | m_PrefabInternal: {fileID: 0} 583 | m_GameObject: {fileID: 1980900626} 584 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 585 | m_LocalPosition: {x: 0.43026447, y: -0.86002684, z: -2.5533788} 586 | m_LocalScale: {x: 1, y: 1, z: 1} 587 | m_Children: [] 588 | m_Father: {fileID: 686371865} 589 | m_RootOrder: 0 590 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 591 | --- !u!114 &1980900628 592 | MonoBehaviour: 593 | m_ObjectHideFlags: 3 594 | m_PrefabParentObject: {fileID: 0} 595 | m_PrefabInternal: {fileID: 0} 596 | m_GameObject: {fileID: 1980900626} 597 | m_Enabled: 1 598 | m_EditorHideFlags: 0 599 | m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} 600 | m_Name: 601 | m_EditorClassIdentifier: 602 | --- !u!114 &1980900629 603 | MonoBehaviour: 604 | m_ObjectHideFlags: 3 605 | m_PrefabParentObject: {fileID: 0} 606 | m_PrefabInternal: {fileID: 0} 607 | m_GameObject: {fileID: 1980900626} 608 | m_Enabled: 1 609 | m_EditorHideFlags: 0 610 | m_Script: {fileID: 11500000, guid: 68bb026fafb42b14791938953eaace77, type: 3} 611 | m_Name: 612 | m_EditorClassIdentifier: 613 | m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2} 614 | m_AmplitudeGain: 1 615 | m_FrequencyGain: 1 616 | --- !u!114 &1980900630 617 | MonoBehaviour: 618 | m_ObjectHideFlags: 3 619 | m_PrefabParentObject: {fileID: 0} 620 | m_PrefabInternal: {fileID: 0} 621 | m_GameObject: {fileID: 1980900626} 622 | m_Enabled: 1 623 | m_EditorHideFlags: 0 624 | m_Script: {fileID: 11500000, guid: 1e8b78ac948f05a46a6d8339a503172b, type: 3} 625 | m_Name: 626 | m_EditorClassIdentifier: 627 | -------------------------------------------------------------------------------- /FPEKitCinemachine/Scripts/CutsceneTrigger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using Cinemachine; 3 | using Whilefun.FPEKit; 4 | 5 | public class CutsceneTrigger : MonoBehaviour { 6 | 7 | [SerializeField, Tooltip("The Cinemachine cutscene camera you want this trigger to cut to")] 8 | private CinemachineVirtualCameraBase cameraToTrigger; 9 | 10 | [SerializeField, Tooltip("The length of time (seconds) the cutscene camera should remain active")] 11 | private float cameraCutDuration = 3.0f; 12 | 13 | private float cameraCutCountdown = 0.0f; 14 | private bool cutsceneCameraEnabled = false; 15 | 16 | void Start() 17 | { 18 | 19 | // Tell the camera to follow the player once the player exists (it will be instantiated by FPECore) 20 | cameraToTrigger.GetComponent().LookAt = FPEPlayer.Instance.gameObject.transform; 21 | turnOffCamera(); 22 | 23 | } 24 | 25 | void OnTriggerEnter(Collider other) 26 | { 27 | 28 | if (other.CompareTag("Player")) 29 | { 30 | Debug.Log("Player entered trigger '"+gameObject.name+"'. Switching to cutscene for " + cameraCutDuration + " seconds."); 31 | turnOnCamera(); 32 | } 33 | 34 | } 35 | 36 | void Update() 37 | { 38 | 39 | if (cutsceneCameraEnabled) 40 | { 41 | 42 | cameraCutCountdown -= Time.deltaTime; 43 | 44 | if(cameraCutCountdown <= 0.0f) 45 | { 46 | turnOffCamera(); 47 | 48 | } 49 | 50 | } 51 | 52 | } 53 | 54 | private void turnOnCamera() 55 | { 56 | 57 | cameraToTrigger.gameObject.SetActive(true); 58 | cutsceneCameraEnabled = true; 59 | 60 | } 61 | 62 | private void turnOffCamera() 63 | { 64 | 65 | cameraToTrigger.gameObject.SetActive(false); 66 | cutsceneCameraEnabled = false; 67 | cameraCutCountdown = cameraCutDuration; 68 | 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /FungusIntegration/Documentation/README.txt: -------------------------------------------------------------------------------- 1 | Steps: 2 | ----- 3 | 1) Import First Person Exploration Kit, then import Fungus 4 | 2) Place the FungusIntegration folder alongside the others in your Assets folder 5 | 3) Edit the FPEPlayerController prefab, and attach the included FPEFungusHelper script component 6 | 4) Open the included FungusTest scene, and run 7 | 5) Walk into the circle on the floor (this triggers Fungus dialog sequence) 8 | 6) Resume normal gameplay 9 | 10 | Note: You can also pickup the blue "MysteryObject" which will also trigger some dialog. 11 | 12 | 13 | Creating Additional Fungus Dialog: 14 | --------------------------------- 15 | 16 | 1) Create a regular Fungus Flowchart-based dialog object, and name it "MyCustomFungusDialog". 17 | 2) Ensure that the first and last things in the flow chart are Priority Up and Priority Down, per the example scene's "MyBasicFungusDialog" object 18 | 3) Disable the game object "MyCustomFungusDialog" created in step 1 above 19 | 4) Add an FPEEventTrigger or other event-driven means to enable a game object (e.g. Pickup or Put Back event, Activation, etc.) 20 | 5) Assign your chosen even in the inspector or your script so that it enables your custom "MyCustomFungusDialog" object from step 1 21 | 22 | When you run your scene, the assigned event will trigger the player to stop moving and the dialog will start. 23 | 24 | Note: If you wish to have dialog play while the player is still moving, simply exclude the Priority Up and Priority Down items from your custom dialog. 25 | 26 | -------------------------------------------------------------------------------- /FungusIntegration/FPEKitWithFungus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/FungusIntegration/FPEKitWithFungus.gif -------------------------------------------------------------------------------- /FungusIntegration/Materials/MysteryObject.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: MysteryObject 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 1 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 2800000, guid: 6ae0aa716519fe341b76fb9fe6d5f82a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 6ae0aa716519fe341b76fb9fe6d5f82a, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 1.0717734, g: 1.0717734, b: 1.0717734, a: 1} 78 | -------------------------------------------------------------------------------- /FungusIntegration/Materials/MysteryObject.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da8c2ee274f5dd04085d4b608bd0c786 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FungusIntegration/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity 2018.3.1f1 2 | Fungus v3.10.0 3 | FPEKit v2.2.3 4 | -------------------------------------------------------------------------------- /FungusIntegration/Resources/Pickups/MysteryObject.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &219005379000081927 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 219005379000081920} 12 | - component: {fileID: 219005379000081923} 13 | - component: {fileID: 219005379000081922} 14 | - component: {fileID: 219005379000081925} 15 | - component: {fileID: 219005379000081924} 16 | m_Layer: 0 17 | m_Name: MyFungusPickupDialog 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 0 23 | --- !u!4 &219005379000081920 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 219005379000081927} 30 | m_LocalRotation: {x: -0, y: -0.7933532, z: 0, w: 0.6087617} 31 | m_LocalPosition: {x: 18.203548, y: -4.526783, z: 0.24642986} 32 | m_LocalScale: {x: 4.10779, y: 4.1077886, z: 4.10779} 33 | m_Children: [] 34 | m_Father: {fileID: 6526257574652870927} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!114 &219005379000081923 38 | MonoBehaviour: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 219005379000081927} 44 | m_Enabled: 1 45 | m_EditorHideFlags: 0 46 | m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} 47 | m_Name: 48 | m_EditorClassIdentifier: 49 | version: 1 50 | scrollPos: {x: 0, y: 0} 51 | variablesScrollPos: {x: 0, y: 0} 52 | variablesExpanded: 1 53 | blockViewHeight: 400 54 | zoom: 1 55 | scrollViewRect: 56 | serializedVersion: 2 57 | x: 0 58 | y: 0 59 | width: 0 60 | height: 0 61 | selectedBlocks: 62 | - {fileID: 219005379000081922} 63 | selectedCommands: 64 | - {fileID: 219005379000081924} 65 | variables: [] 66 | description: Started from Cutscene 67 | stepPause: 0 68 | colorCommands: 1 69 | hideComponents: 1 70 | saveSelection: 1 71 | localizationId: 72 | showLineNumbers: 0 73 | hideCommands: [] 74 | luaEnvironment: {fileID: 0} 75 | luaBindingName: flowchart 76 | --- !u!114 &219005379000081922 77 | MonoBehaviour: 78 | m_ObjectHideFlags: 0 79 | m_CorrespondingSourceObject: {fileID: 0} 80 | m_PrefabInstance: {fileID: 0} 81 | m_PrefabAsset: {fileID: 0} 82 | m_GameObject: {fileID: 219005379000081927} 83 | m_Enabled: 1 84 | m_EditorHideFlags: 0 85 | m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} 86 | m_Name: 87 | m_EditorClassIdentifier: 88 | nodeRect: 89 | serializedVersion: 2 90 | x: 213 91 | y: 218 92 | width: 121 93 | height: 40 94 | tint: {r: 1, g: 1, b: 1, a: 1} 95 | useCustomTint: 0 96 | itemId: 0 97 | blockName: Some dialog 98 | description: Some basic dialog for a cutscene 99 | eventHandler: {fileID: 219005379000081925} 100 | commandList: 101 | - {fileID: 219005379000081924} 102 | --- !u!114 &219005379000081925 103 | MonoBehaviour: 104 | m_ObjectHideFlags: 0 105 | m_CorrespondingSourceObject: {fileID: 0} 106 | m_PrefabInstance: {fileID: 0} 107 | m_PrefabAsset: {fileID: 0} 108 | m_GameObject: {fileID: 219005379000081927} 109 | m_Enabled: 1 110 | m_EditorHideFlags: 0 111 | m_Script: {fileID: 11500000, guid: 8ff5d850a887844fe87ae7d366d3ab5e, type: 3} 112 | m_Name: 113 | m_EditorClassIdentifier: 114 | parentBlock: {fileID: 219005379000081922} 115 | --- !u!114 &219005379000081924 116 | MonoBehaviour: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | m_GameObject: {fileID: 219005379000081927} 122 | m_Enabled: 1 123 | m_EditorHideFlags: 0 124 | m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} 125 | m_Name: 126 | m_EditorClassIdentifier: 127 | itemId: 1 128 | indentLevel: 0 129 | storyText: What a delicious apple. 130 | description: 131 | character: {fileID: 0} 132 | portrait: {fileID: 21300000, guid: 96ca91f43a9c1f74b970b59f46047e74, type: 3} 133 | voiceOverClip: {fileID: 0} 134 | showAlways: 1 135 | showCount: 1 136 | extendPrevious: 0 137 | fadeWhenDone: 1 138 | waitForClick: 0 139 | stopVoiceover: 1 140 | waitForVO: 0 141 | setSayDialog: {fileID: 0} 142 | --- !u!1 &7373838831288366038 143 | GameObject: 144 | m_ObjectHideFlags: 0 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInstance: {fileID: 0} 147 | m_PrefabAsset: {fileID: 0} 148 | serializedVersion: 6 149 | m_Component: 150 | - component: {fileID: 6526257574652870927} 151 | - component: {fileID: 1072909500723092872} 152 | - component: {fileID: 8582921787353736561} 153 | - component: {fileID: 4445785660769386787} 154 | - component: {fileID: 7200839620705399258} 155 | - component: {fileID: 1584099757370259347} 156 | - component: {fileID: 685862638502241892} 157 | m_Layer: 0 158 | m_Name: MysteryObject 159 | m_TagString: Untagged 160 | m_Icon: {fileID: 0} 161 | m_NavMeshLayer: 0 162 | m_StaticEditorFlags: 0 163 | m_IsActive: 1 164 | --- !u!4 &6526257574652870927 165 | Transform: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 7373838831288366038} 171 | m_LocalRotation: {x: -0, y: 0.7933532, z: -0, w: 0.6087617} 172 | m_LocalPosition: {x: 1.089, y: 1.102, z: 4.296} 173 | m_LocalScale: {x: 0.24344, y: 0.24344, z: 0.24344} 174 | m_Children: 175 | - {fileID: 219005379000081920} 176 | m_Father: {fileID: 0} 177 | m_RootOrder: 0 178 | m_LocalEulerAnglesHint: {x: 0, y: 105.00001, z: 0} 179 | --- !u!33 &1072909500723092872 180 | MeshFilter: 181 | m_ObjectHideFlags: 0 182 | m_CorrespondingSourceObject: {fileID: 0} 183 | m_PrefabInstance: {fileID: 0} 184 | m_PrefabAsset: {fileID: 0} 185 | m_GameObject: {fileID: 7373838831288366038} 186 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 187 | --- !u!23 &8582921787353736561 188 | MeshRenderer: 189 | m_ObjectHideFlags: 0 190 | m_CorrespondingSourceObject: {fileID: 0} 191 | m_PrefabInstance: {fileID: 0} 192 | m_PrefabAsset: {fileID: 0} 193 | m_GameObject: {fileID: 7373838831288366038} 194 | m_Enabled: 1 195 | m_CastShadows: 1 196 | m_ReceiveShadows: 1 197 | m_DynamicOccludee: 1 198 | m_MotionVectors: 1 199 | m_LightProbeUsage: 1 200 | m_ReflectionProbeUsage: 1 201 | m_RenderingLayerMask: 1 202 | m_RendererPriority: 0 203 | m_Materials: 204 | - {fileID: 2100000, guid: da8c2ee274f5dd04085d4b608bd0c786, type: 2} 205 | m_StaticBatchInfo: 206 | firstSubMesh: 0 207 | subMeshCount: 0 208 | m_StaticBatchRoot: {fileID: 0} 209 | m_ProbeAnchor: {fileID: 0} 210 | m_LightProbeVolumeOverride: {fileID: 0} 211 | m_ScaleInLightmap: 1 212 | m_PreserveUVs: 0 213 | m_IgnoreNormalsForChartDetection: 0 214 | m_ImportantGI: 0 215 | m_StitchLightmapSeams: 0 216 | m_SelectedEditorRenderState: 3 217 | m_MinimumChartSize: 4 218 | m_AutoUVMaxDistance: 0.5 219 | m_AutoUVMaxAngle: 89 220 | m_LightmapParameters: {fileID: 0} 221 | m_SortingLayerID: 0 222 | m_SortingLayer: 0 223 | m_SortingOrder: 0 224 | --- !u!65 &4445785660769386787 225 | BoxCollider: 226 | m_ObjectHideFlags: 0 227 | m_CorrespondingSourceObject: {fileID: 0} 228 | m_PrefabInstance: {fileID: 0} 229 | m_PrefabAsset: {fileID: 0} 230 | m_GameObject: {fileID: 7373838831288366038} 231 | m_Material: {fileID: 0} 232 | m_IsTrigger: 0 233 | m_Enabled: 1 234 | serializedVersion: 2 235 | m_Size: {x: 1, y: 1, z: 1} 236 | m_Center: {x: 0, y: 0, z: 0} 237 | --- !u!54 &7200839620705399258 238 | Rigidbody: 239 | m_ObjectHideFlags: 0 240 | m_CorrespondingSourceObject: {fileID: 0} 241 | m_PrefabInstance: {fileID: 0} 242 | m_PrefabAsset: {fileID: 0} 243 | m_GameObject: {fileID: 7373838831288366038} 244 | serializedVersion: 2 245 | m_Mass: 1 246 | m_Drag: 0 247 | m_AngularDrag: 0.05 248 | m_UseGravity: 1 249 | m_IsKinematic: 0 250 | m_Interpolate: 0 251 | m_Constraints: 0 252 | m_CollisionDetection: 0 253 | --- !u!82 &1584099757370259347 254 | AudioSource: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 7373838831288366038} 260 | m_Enabled: 1 261 | serializedVersion: 4 262 | OutputAudioMixerGroup: {fileID: 0} 263 | m_audioClip: {fileID: 0} 264 | m_PlayOnAwake: 1 265 | m_Volume: 1 266 | m_Pitch: 1 267 | Loop: 0 268 | Mute: 0 269 | Spatialize: 0 270 | SpatializePostEffects: 0 271 | Priority: 128 272 | DopplerLevel: 1 273 | MinDistance: 1 274 | MaxDistance: 500 275 | Pan2D: 0 276 | rolloffMode: 0 277 | BypassEffects: 0 278 | BypassListenerEffects: 0 279 | BypassReverbZones: 0 280 | rolloffCustomCurve: 281 | serializedVersion: 2 282 | m_Curve: 283 | - serializedVersion: 3 284 | time: 0 285 | value: 1 286 | inSlope: 0 287 | outSlope: 0 288 | tangentMode: 0 289 | weightedMode: 0 290 | inWeight: 0.33333334 291 | outWeight: 0.33333334 292 | - serializedVersion: 3 293 | time: 1 294 | value: 0 295 | inSlope: 0 296 | outSlope: 0 297 | tangentMode: 0 298 | weightedMode: 0 299 | inWeight: 0.33333334 300 | outWeight: 0.33333334 301 | m_PreInfinity: 2 302 | m_PostInfinity: 2 303 | m_RotationOrder: 4 304 | panLevelCustomCurve: 305 | serializedVersion: 2 306 | m_Curve: 307 | - serializedVersion: 3 308 | time: 0 309 | value: 0 310 | inSlope: 0 311 | outSlope: 0 312 | tangentMode: 0 313 | weightedMode: 0 314 | inWeight: 0.33333334 315 | outWeight: 0.33333334 316 | m_PreInfinity: 2 317 | m_PostInfinity: 2 318 | m_RotationOrder: 4 319 | spreadCustomCurve: 320 | serializedVersion: 2 321 | m_Curve: 322 | - serializedVersion: 3 323 | time: 0 324 | value: 0 325 | inSlope: 0 326 | outSlope: 0 327 | tangentMode: 0 328 | weightedMode: 0 329 | inWeight: 0.33333334 330 | outWeight: 0.33333334 331 | m_PreInfinity: 2 332 | m_PostInfinity: 2 333 | m_RotationOrder: 4 334 | reverbZoneMixCustomCurve: 335 | serializedVersion: 2 336 | m_Curve: 337 | - serializedVersion: 3 338 | time: 0 339 | value: 1 340 | inSlope: 0 341 | outSlope: 0 342 | tangentMode: 0 343 | weightedMode: 0 344 | inWeight: 0.33333334 345 | outWeight: 0.33333334 346 | m_PreInfinity: 2 347 | m_PostInfinity: 2 348 | m_RotationOrder: 4 349 | --- !u!114 &685862638502241892 350 | MonoBehaviour: 351 | m_ObjectHideFlags: 0 352 | m_CorrespondingSourceObject: {fileID: 0} 353 | m_PrefabInstance: {fileID: 0} 354 | m_PrefabAsset: {fileID: 0} 355 | m_GameObject: {fileID: 7373838831288366038} 356 | m_Enabled: 1 357 | m_EditorHideFlags: 0 358 | m_Script: {fileID: 11500000, guid: 84704c29960748b4b8a656ccb957e2c2, type: 3} 359 | m_Name: 360 | m_EditorClassIdentifier: 361 | highlightOnMouseOver: 1 362 | highlightColor: {r: 0.57, g: 0.57, b: 1, a: 1} 363 | interactionDistance: 2 364 | playSecondarySoundOnInteract: 0 365 | showWithText: 0 366 | audioLogText: 367 | soundPlaybackBehaviour: 0 368 | soundToPlayOnInteract: {fileID: 0} 369 | interactionString: What is this? 370 | putBackString: Put back 371 | postExaminationInteractionString: It's a mysterious object 372 | autoGeneratePutBackObject: 0 373 | examinationOffsetUp: 0 374 | examinationOffsetForward: 0 375 | pickupRotationOffset: {x: 0, y: 0, z: 0} 376 | tossStrength: 1 377 | tossOffsetUp: 0.1 378 | tossOffsetForward: 0.1 379 | rotationLockType: 0 380 | enableSounds: 1 381 | pickupSounds: [] 382 | putBackSounds: [] 383 | impactSounds: [] 384 | OnPickupEvent: 385 | m_PersistentCalls: 386 | m_Calls: 387 | - m_Target: {fileID: 219005379000081927} 388 | m_MethodName: SetActive 389 | m_Mode: 6 390 | m_Arguments: 391 | m_ObjectArgument: {fileID: 0} 392 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 393 | m_IntArgument: 0 394 | m_FloatArgument: 0 395 | m_StringArgument: 396 | m_BoolArgument: 1 397 | m_CallState: 2 398 | m_TypeName: Whilefun.FPEKit.FPEGenericEvent, Assembly-CSharp, Version=0.0.0.0, 399 | Culture=neutral, PublicKeyToken=null 400 | pickupRepeatMode: 0 401 | OnPutBackEvent: 402 | m_PersistentCalls: 403 | m_Calls: [] 404 | m_TypeName: Whilefun.FPEKit.FPEGenericEvent, Assembly-CSharp, Version=0.0.0.0, 405 | Culture=neutral, PublicKeyToken=null 406 | putbackRepeatMode: 0 407 | -------------------------------------------------------------------------------- /FungusIntegration/Scripts/FPEFungusHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Whilefun.FPEKit; 5 | 6 | public class FPEFungusHelper : MonoBehaviour 7 | { 8 | 9 | void OnEnable() 10 | { 11 | Fungus.FungusPrioritySignals.OnFungusPriorityStart += FungusPrioritySignals_OnFungusPriorityStart; 12 | Fungus.FungusPrioritySignals.OnFungusPriorityEnd += FungusPrioritySignals_OnFungusPriorityEnd; 13 | } 14 | 15 | void OnDisable() 16 | { 17 | Fungus.FungusPrioritySignals.OnFungusPriorityStart -= FungusPrioritySignals_OnFungusPriorityStart; 18 | Fungus.FungusPrioritySignals.OnFungusPriorityEnd -= FungusPrioritySignals_OnFungusPriorityEnd; 19 | } 20 | 21 | private void FungusPrioritySignals_OnFungusPriorityEnd() 22 | { 23 | FPEInteractionManagerScript.Instance.EndCutscene(true); 24 | } 25 | 26 | private void FungusPrioritySignals_OnFungusPriorityStart() 27 | { 28 | FPEInteractionManagerScript.Instance.BeginCutscene(true); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /FungusIntegration/Textures/mysteryObject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/FungusIntegration/Textures/mysteryObject.png -------------------------------------------------------------------------------- /FungusIntegration/Textures/mysteryObject.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ae0aa716519fe341b76fb9fe6d5f82a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FPEKitAddOns 2 | A set of free add-ons for users of First Person Exploration Kit. 3 | 4 | # Overview 5 | Each folder contains a file called Requirements.txt. This file lists the Unity version, First Person Exploration Kit version, and other package dependencies (with versions) required for that add on to work. 6 | 7 | 8 | # IMPORTANT NOTE 9 | All add-ons that rely on 3rd party packages (e.g. Cinemachine) should be considered in permanent Beta. Support will be provided where possible, but external 3rd party updates may change how the add-on behaves. 10 | 11 | 12 | 13 | # Elevator 14 | A sample project that uses elevator floors to switch scenes. 15 | 16 | ![Screenshot](https://github.com/whilefun/FPEKitAddOns/blob/master/Elevator/Elevator.gif) 17 | 18 | # FPEKitCinemachine 19 | A basic integration of a Cinemachine-driven cutscene camera with First Person Exploration Kit v2.0.2 20 | 21 | ![Screenshot](https://github.com/whilefun/FPEKitAddOns/blob/master/FPEKitCinemachine/CinemachineCut.gif) 22 | 23 | # Teleport 24 | A simple single scene teleporter. Works like default Doorways, but does not load a new scene or save/load data. Good for cinematic hard cuts, etc. 25 | 26 | ![Screenshot](https://github.com/whilefun/FPEKitAddOns/blob/master/Teleport/Teleport.gif) 27 | 28 | # Start Docked 29 | A new player start type that allows the player to start the game in a dock (e.g. waking up sat in a chair) 30 | 31 | ![Screenshot](https://github.com/whilefun/FPEKitAddOns/blob/master/StartDocked/StartDocked.jpg) 32 | 33 | # Surface Footsteps 34 | A simple way to add various surfaces to your game that make the player's footsteps sound different (e.g. Walking on hardwood floor vs. carpet) 35 | 36 | # Fungus Integration 37 | Integration with the Fungus dialog system so you can add your favourite Fungus dialog and features to your game! 38 | ![Screenshot](https://github.com/whilefun/FPEKitAddOns/blob/master/FungusIntegration/FPEKitWithFungus.gif) 39 | 40 | # Virtual Snapshot Integration 41 | Basic integration with another While Fun Games asset: [Virtual Snapshot](https://assetstore.unity.com/packages/templates/systems/virtual-snapshot-57968) 42 | -------------------------------------------------------------------------------- /StartDocked/Documentation/DockStartChanges.txt: -------------------------------------------------------------------------------- 1 | 2 | ------------------------------------- 3 | 1) Modify FPEInteractionManagerScript: 4 | ------------------------------------- 5 | 6 | Added new function DockPlayerOnStart (I placed it between DockPlayer() and UnDockPlayer(), around line 2571): 7 | 8 | /// 9 | /// Docks the player for special start docks 10 | /// 11 | /// 12 | public void DockPlayerOnStart(FPEInteractableDockScript dock) 13 | { 14 | 15 | currentDock = dock.gameObject; 16 | dock.dock(); 17 | thePlayer.GetComponent().dockThePlayer(dock.DockTransform, dock.DockedViewLimits, dock.FocusTransform.position, false); 18 | currentDockActionType = FPEFirstPersonController.ePlayerDockingState.DOCKING; 19 | dockingInProgress = true; 20 | 21 | } 22 | 23 | ------------------------------ 24 | 2) Modified FPESaveLoadManager: 25 | ------------------------------ 26 | 27 | Replace movePlayerToSuitableEntranceOrStartPosition() in full with this version of the function: 28 | 29 | 30 | /// 31 | /// Moves the player to the currently loaded scene's most appropriate starting position. If a 32 | /// new game (previous scene was not "real level" - less than firstLevelSceneBuildIndex), a 33 | /// FPEPlayerStartLocation is searched for. If not, a Doorway Entrance is searched for. If 34 | /// neither can be found, an error is printed and the player is placed at the world origin. 35 | /// 36 | private void movePlayerToSuitableEntranceOrStartPosition() 37 | { 38 | 39 | GameObject thePlayer = FPEPlayer.Instance.gameObject; 40 | 41 | // If previous scene was LESS than our first known real level, we assume this is a new game 42 | if (previousSceneIndex < firstLevelSceneBuildIndex) 43 | { 44 | 45 | FPEPlayerStartLocation startLocation = GameObject.FindObjectOfType(); 46 | 47 | // Yield to start location if there is one present 48 | if (startLocation != null) 49 | { 50 | 51 | Debug.Log("Player starting in normal start position"); 52 | thePlayer.transform.position = startLocation.gameObject.transform.position; 53 | thePlayer.transform.rotation = startLocation.gameObject.transform.rotation; 54 | 55 | } 56 | else 57 | { 58 | 59 | // Find a starting dock location 60 | FPEPlayerStartDocked dockStart = GameObject.FindObjectOfType(); 61 | 62 | if (dockStart != null) 63 | { 64 | 65 | thePlayer.transform.position = dockStart.gameObject.transform.position; 66 | thePlayer.transform.rotation = dockStart.gameObject.transform.rotation; 67 | 68 | if (dockStart.StartingDock != null) 69 | { 70 | Debug.Log("Player starting in docked start position (docked on '" + dockStart.StartingDock.gameObject.name + "')"); 71 | FPEInteractionManagerScript.Instance.DockPlayerOnStart(dockStart.StartingDock); 72 | } 73 | else 74 | { 75 | Debug.LogError("Found FPEPlayerStartDocked object '"+ dockStart.gameObject.name + "' but it doesn't have a Dock assigned!"); 76 | } 77 | 78 | } 79 | else 80 | { 81 | 82 | Debug.LogWarning("FPESaveLoadManager:: No FPEPlayerStartLocation was found in scene. Placing player at origin instead."); 83 | thePlayer.transform.position = Vector3.zero; 84 | thePlayer.transform.rotation = Quaternion.identity; 85 | 86 | } 87 | 88 | } 89 | 90 | } 91 | // Otherwise, yield to the appropriate doorway. 92 | else 93 | { 94 | 95 | FPEDoorway[] doorways = GameObject.FindObjectsOfType(); 96 | bool foundDoorway = false; 97 | 98 | for (int d = 0; d < doorways.Length; d++) 99 | { 100 | 101 | if (doorways[d].ConnectedSceneIndex == previousSceneIndex) 102 | { 103 | 104 | thePlayer.transform.position = doorways[d].DoorwayEntranceTransform.position; 105 | thePlayer.transform.rotation = doorways[d].DoorwayEntranceTransform.rotation; 106 | foundDoorway = true; 107 | break; 108 | 109 | } 110 | 111 | } 112 | 113 | if (foundDoorway == false) 114 | { 115 | 116 | Debug.LogWarning("FPESaveLoadManager:: No FPEDoorway was found that matched connected scene '" + previousSceneIndex + "'. Placing player at origin instead."); 117 | thePlayer.transform.position = Vector3.zero; 118 | thePlayer.transform.rotation = Quaternion.identity; 119 | 120 | } 121 | 122 | } 123 | 124 | } 125 | 126 | 127 | ------- 128 | To Test: 129 | ------- 130 | 131 | 1) In Build Settings, ensure DockStartMainMenu is scene index 0 and DockStart is scene index 1. 132 | 2) Open DockStartMainMenu and play scene. 133 | 3) Select New Game, and player will start game docked in the chair. From there, you just play as normal. 134 | 135 | To modify the starting dock, open DockStart scene and change the PlayerStartDocked object. As configured, it will start the player in the armchair (blue line drawn from yellow sphere to armchair), and when the player undocks, they will "go back" to the yellow sphere. This simulates where the player will stand/face when they get out of the dock. 136 | 137 | ---- 138 | Note: 139 | ---- 140 | 141 | If there is a normal PlayerStart present in the scene, it will supercede the dock start. To test, you can enable the PlayerStart object and try again. The player will be placed there and the dock start will be ignored. Subsequent level doorways will behave as they did before. Namely, once you go through a door, you are placed at the next level's entrance. Similarly, when you load your game, you are loaded into the last known location per previous package behaviour. 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /StartDocked/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity v5.5.4p3+ 2 | FPEKit v2.1 3 | -------------------------------------------------------------------------------- /StartDocked/Scenes/DockStart.unity: -------------------------------------------------------------------------------- 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: 7 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.6397059, g: 0.6397059, b: 0.6397059, 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_SkyboxMaterial: {fileID: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 1 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentTypeID: 0 83 | agentRadius: 0.5 84 | agentHeight: 2 85 | agentSlope: 45 86 | agentClimb: 0.4 87 | ledgeDropHeight: 0 88 | maxJumpAcrossDistance: 0 89 | minRegionArea: 2 90 | manualCellSize: 0 91 | cellSize: 0.16666667 92 | accuratePlacement: 0 93 | m_NavMeshData: {fileID: 0} 94 | --- !u!1 &125200953 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 0} 99 | serializedVersion: 5 100 | m_Component: 101 | - component: {fileID: 125200955} 102 | - component: {fileID: 125200954} 103 | m_Layer: 0 104 | m_Name: PlayerStartDocked 105 | m_TagString: Untagged 106 | m_Icon: {fileID: 0} 107 | m_NavMeshLayer: 0 108 | m_StaticEditorFlags: 0 109 | m_IsActive: 1 110 | --- !u!114 &125200954 111 | MonoBehaviour: 112 | m_ObjectHideFlags: 0 113 | m_PrefabParentObject: {fileID: 0} 114 | m_PrefabInternal: {fileID: 0} 115 | m_GameObject: {fileID: 125200953} 116 | m_Enabled: 1 117 | m_EditorHideFlags: 0 118 | m_Script: {fileID: 11500000, guid: 0f15b61c3acd1614681c46e03b3df60b, type: 3} 119 | m_Name: 120 | m_EditorClassIdentifier: 121 | startingDock: {fileID: 1567653172} 122 | --- !u!4 &125200955 123 | Transform: 124 | m_ObjectHideFlags: 0 125 | m_PrefabParentObject: {fileID: 0} 126 | m_PrefabInternal: {fileID: 0} 127 | m_GameObject: {fileID: 125200953} 128 | m_LocalRotation: {x: -0, y: -0.98069704, z: -0, w: 0.19553377} 129 | m_LocalPosition: {x: 3.64, y: 0.23, z: 5.3} 130 | m_LocalScale: {x: 1, y: 1, z: 1} 131 | m_Children: [] 132 | m_Father: {fileID: 0} 133 | m_RootOrder: 5 134 | m_LocalEulerAnglesHint: {x: 0, y: -157.44801, z: 0} 135 | --- !u!1001 &182395920 136 | Prefab: 137 | m_ObjectHideFlags: 0 138 | serializedVersion: 2 139 | m_Modification: 140 | m_TransformParent: {fileID: 0} 141 | m_Modifications: 142 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 143 | propertyPath: m_LocalPosition.x 144 | value: 0 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 147 | propertyPath: m_LocalPosition.y 148 | value: 0 149 | objectReference: {fileID: 0} 150 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 151 | propertyPath: m_LocalPosition.z 152 | value: 0 153 | objectReference: {fileID: 0} 154 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 155 | propertyPath: m_LocalRotation.x 156 | value: 0 157 | objectReference: {fileID: 0} 158 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 159 | propertyPath: m_LocalRotation.y 160 | value: 0 161 | objectReference: {fileID: 0} 162 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 163 | propertyPath: m_LocalRotation.z 164 | value: 0 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 167 | propertyPath: m_LocalRotation.w 168 | value: 1 169 | objectReference: {fileID: 0} 170 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 171 | propertyPath: m_RootOrder 172 | value: 2 173 | objectReference: {fileID: 0} 174 | m_RemovedComponents: [] 175 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 176 | m_IsPrefabParent: 0 177 | --- !u!1 &620011929 178 | GameObject: 179 | m_ObjectHideFlags: 0 180 | m_PrefabParentObject: {fileID: 0} 181 | m_PrefabInternal: {fileID: 0} 182 | serializedVersion: 5 183 | m_Component: 184 | - component: {fileID: 620011931} 185 | - component: {fileID: 620011930} 186 | m_Layer: 0 187 | m_Name: Directional Light 188 | m_TagString: Untagged 189 | m_Icon: {fileID: 0} 190 | m_NavMeshLayer: 0 191 | m_StaticEditorFlags: 0 192 | m_IsActive: 1 193 | --- !u!108 &620011930 194 | Light: 195 | m_ObjectHideFlags: 0 196 | m_PrefabParentObject: {fileID: 0} 197 | m_PrefabInternal: {fileID: 0} 198 | m_GameObject: {fileID: 620011929} 199 | m_Enabled: 1 200 | serializedVersion: 7 201 | m_Type: 1 202 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 203 | m_Intensity: 1 204 | m_Range: 10 205 | m_SpotAngle: 30 206 | m_CookieSize: 10 207 | m_Shadows: 208 | m_Type: 2 209 | m_Resolution: -1 210 | m_CustomResolution: -1 211 | m_Strength: 1 212 | m_Bias: 0.05 213 | m_NormalBias: 0.4 214 | m_NearPlane: 0.2 215 | m_Cookie: {fileID: 0} 216 | m_DrawHalo: 0 217 | m_Flare: {fileID: 0} 218 | m_RenderMode: 0 219 | m_CullingMask: 220 | serializedVersion: 2 221 | m_Bits: 4294967295 222 | m_Lightmapping: 4 223 | m_AreaSize: {x: 1, y: 1} 224 | m_BounceIntensity: 1 225 | m_ShadowRadius: 0 226 | m_ShadowAngle: 0 227 | --- !u!4 &620011931 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_PrefabParentObject: {fileID: 0} 231 | m_PrefabInternal: {fileID: 0} 232 | m_GameObject: {fileID: 620011929} 233 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 234 | m_LocalPosition: {x: 0, y: 3, z: 0} 235 | m_LocalScale: {x: 1, y: 1, z: 1} 236 | m_Children: [] 237 | m_Father: {fileID: 0} 238 | m_RootOrder: 0 239 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 240 | --- !u!1 &1467543746 241 | GameObject: 242 | m_ObjectHideFlags: 0 243 | m_PrefabParentObject: {fileID: 0} 244 | m_PrefabInternal: {fileID: 0} 245 | serializedVersion: 5 246 | m_Component: 247 | - component: {fileID: 1467543750} 248 | - component: {fileID: 1467543749} 249 | - component: {fileID: 1467543748} 250 | - component: {fileID: 1467543747} 251 | m_Layer: 0 252 | m_Name: Plane 253 | m_TagString: Untagged 254 | m_Icon: {fileID: 0} 255 | m_NavMeshLayer: 0 256 | m_StaticEditorFlags: 0 257 | m_IsActive: 1 258 | --- !u!23 &1467543747 259 | MeshRenderer: 260 | m_ObjectHideFlags: 0 261 | m_PrefabParentObject: {fileID: 0} 262 | m_PrefabInternal: {fileID: 0} 263 | m_GameObject: {fileID: 1467543746} 264 | m_Enabled: 1 265 | m_CastShadows: 1 266 | m_ReceiveShadows: 1 267 | m_MotionVectors: 1 268 | m_LightProbeUsage: 1 269 | m_ReflectionProbeUsage: 1 270 | m_Materials: 271 | - {fileID: 2100000, guid: f2521483140fd684cb25837dd618e4d5, type: 2} 272 | m_StaticBatchInfo: 273 | firstSubMesh: 0 274 | subMeshCount: 0 275 | m_StaticBatchRoot: {fileID: 0} 276 | m_ProbeAnchor: {fileID: 0} 277 | m_LightProbeVolumeOverride: {fileID: 0} 278 | m_ScaleInLightmap: 1 279 | m_PreserveUVs: 1 280 | m_IgnoreNormalsForChartDetection: 0 281 | m_ImportantGI: 0 282 | m_SelectedEditorRenderState: 3 283 | m_MinimumChartSize: 4 284 | m_AutoUVMaxDistance: 0.5 285 | m_AutoUVMaxAngle: 89 286 | m_LightmapParameters: {fileID: 0} 287 | m_SortingLayerID: 0 288 | m_SortingOrder: 0 289 | --- !u!64 &1467543748 290 | MeshCollider: 291 | m_ObjectHideFlags: 0 292 | m_PrefabParentObject: {fileID: 0} 293 | m_PrefabInternal: {fileID: 0} 294 | m_GameObject: {fileID: 1467543746} 295 | m_Material: {fileID: 0} 296 | m_IsTrigger: 0 297 | m_Enabled: 1 298 | serializedVersion: 2 299 | m_Convex: 0 300 | m_InflateMesh: 0 301 | m_SkinWidth: 0.01 302 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 303 | --- !u!33 &1467543749 304 | MeshFilter: 305 | m_ObjectHideFlags: 0 306 | m_PrefabParentObject: {fileID: 0} 307 | m_PrefabInternal: {fileID: 0} 308 | m_GameObject: {fileID: 1467543746} 309 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 310 | --- !u!4 &1467543750 311 | Transform: 312 | m_ObjectHideFlags: 0 313 | m_PrefabParentObject: {fileID: 0} 314 | m_PrefabInternal: {fileID: 0} 315 | m_GameObject: {fileID: 1467543746} 316 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 317 | m_LocalPosition: {x: 0, y: 0, z: 0} 318 | m_LocalScale: {x: 5, y: 5, z: 5} 319 | m_Children: [] 320 | m_Father: {fileID: 0} 321 | m_RootOrder: 3 322 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 323 | --- !u!1001 &1567653171 324 | Prefab: 325 | m_ObjectHideFlags: 0 326 | serializedVersion: 2 327 | m_Modification: 328 | m_TransformParent: {fileID: 0} 329 | m_Modifications: 330 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 331 | propertyPath: m_LocalPosition.x 332 | value: 4.1742177 333 | objectReference: {fileID: 0} 334 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 335 | propertyPath: m_LocalPosition.y 336 | value: -1.4581846e-16 337 | objectReference: {fileID: 0} 338 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 339 | propertyPath: m_LocalPosition.z 340 | value: 6.5670795 341 | objectReference: {fileID: 0} 342 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 343 | propertyPath: m_LocalRotation.x 344 | value: -0 345 | objectReference: {fileID: 0} 346 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 347 | propertyPath: m_LocalRotation.y 348 | value: -0.5900759 349 | objectReference: {fileID: 0} 350 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 351 | propertyPath: m_LocalRotation.z 352 | value: -0 353 | objectReference: {fileID: 0} 354 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 355 | propertyPath: m_LocalRotation.w 356 | value: 0.8073478 357 | objectReference: {fileID: 0} 358 | - target: {fileID: 4670670746894792, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 359 | propertyPath: m_RootOrder 360 | value: 1 361 | objectReference: {fileID: 0} 362 | m_RemovedComponents: [] 363 | m_ParentPrefab: {fileID: 100100000, guid: df5674ee800863346bc6f0d0d558aaa8, type: 2} 364 | m_IsPrefabParent: 0 365 | --- !u!114 &1567653172 stripped 366 | MonoBehaviour: 367 | m_PrefabParentObject: {fileID: 114801370622624110, guid: df5674ee800863346bc6f0d0d558aaa8, 368 | type: 2} 369 | m_PrefabInternal: {fileID: 1567653171} 370 | m_Script: {fileID: 11500000, guid: f6d3c2b11560be94fb657f989ded4ef4, type: 3} 371 | --- !u!1 &2068984212 372 | GameObject: 373 | m_ObjectHideFlags: 0 374 | m_PrefabParentObject: {fileID: 0} 375 | m_PrefabInternal: {fileID: 0} 376 | serializedVersion: 5 377 | m_Component: 378 | - component: {fileID: 2068984214} 379 | - component: {fileID: 2068984213} 380 | m_Layer: 0 381 | m_Name: PlayerStart 382 | m_TagString: Untagged 383 | m_Icon: {fileID: 0} 384 | m_NavMeshLayer: 0 385 | m_StaticEditorFlags: 0 386 | m_IsActive: 0 387 | --- !u!114 &2068984213 388 | MonoBehaviour: 389 | m_ObjectHideFlags: 0 390 | m_PrefabParentObject: {fileID: 0} 391 | m_PrefabInternal: {fileID: 0} 392 | m_GameObject: {fileID: 2068984212} 393 | m_Enabled: 1 394 | m_EditorHideFlags: 0 395 | m_Script: {fileID: 11500000, guid: 8ce19b2cb11f3c34ca5689f4682aebe5, type: 3} 396 | m_Name: 397 | m_EditorClassIdentifier: 398 | --- !u!4 &2068984214 399 | Transform: 400 | m_ObjectHideFlags: 0 401 | m_PrefabParentObject: {fileID: 0} 402 | m_PrefabInternal: {fileID: 0} 403 | m_GameObject: {fileID: 2068984212} 404 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 405 | m_LocalPosition: {x: 0, y: 0.12, z: -3.63} 406 | m_LocalScale: {x: 1, y: 1, z: 1} 407 | m_Children: [] 408 | m_Father: {fileID: 0} 409 | m_RootOrder: 4 410 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 411 | -------------------------------------------------------------------------------- /StartDocked/Scenes/DockStartMainMenu.unity: -------------------------------------------------------------------------------- 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: 7 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.5514706, g: 0.5514706, b: 0.5514706, 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_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 0 54 | m_EnableRealtimeLightmaps: 0 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentTypeID: 0 83 | agentRadius: 0.5 84 | agentHeight: 2 85 | agentSlope: 45 86 | agentClimb: 0.4 87 | ledgeDropHeight: 0 88 | maxJumpAcrossDistance: 0 89 | minRegionArea: 2 90 | manualCellSize: 0 91 | cellSize: 0.16666667 92 | accuratePlacement: 0 93 | m_NavMeshData: {fileID: 0} 94 | --- !u!1001 &339248607 95 | Prefab: 96 | m_ObjectHideFlags: 0 97 | serializedVersion: 2 98 | m_Modification: 99 | m_TransformParent: {fileID: 0} 100 | m_Modifications: 101 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 102 | propertyPath: m_LocalPosition.x 103 | value: 0 104 | objectReference: {fileID: 0} 105 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 106 | propertyPath: m_LocalPosition.y 107 | value: 0 108 | objectReference: {fileID: 0} 109 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 110 | propertyPath: m_LocalPosition.z 111 | value: 0 112 | objectReference: {fileID: 0} 113 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 114 | propertyPath: m_LocalRotation.x 115 | value: 0 116 | objectReference: {fileID: 0} 117 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 118 | propertyPath: m_LocalRotation.y 119 | value: 0 120 | objectReference: {fileID: 0} 121 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 122 | propertyPath: m_LocalRotation.z 123 | value: 0 124 | objectReference: {fileID: 0} 125 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 126 | propertyPath: m_LocalRotation.w 127 | value: 1 128 | objectReference: {fileID: 0} 129 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 130 | propertyPath: m_RootOrder 131 | value: 3 132 | objectReference: {fileID: 0} 133 | - target: {fileID: 1904818688322854, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 134 | propertyPath: m_IsActive 135 | value: 1 136 | objectReference: {fileID: 0} 137 | m_RemovedComponents: [] 138 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 139 | m_IsPrefabParent: 0 140 | --- !u!1 &1116129360 141 | GameObject: 142 | m_ObjectHideFlags: 0 143 | m_PrefabParentObject: {fileID: 0} 144 | m_PrefabInternal: {fileID: 0} 145 | serializedVersion: 5 146 | m_Component: 147 | - component: {fileID: 1116129362} 148 | - component: {fileID: 1116129361} 149 | m_Layer: 0 150 | m_Name: PlayerStartLocation 151 | m_TagString: Untagged 152 | m_Icon: {fileID: 0} 153 | m_NavMeshLayer: 0 154 | m_StaticEditorFlags: 0 155 | m_IsActive: 1 156 | --- !u!114 &1116129361 157 | MonoBehaviour: 158 | m_ObjectHideFlags: 0 159 | m_PrefabParentObject: {fileID: 0} 160 | m_PrefabInternal: {fileID: 0} 161 | m_GameObject: {fileID: 1116129360} 162 | m_Enabled: 1 163 | m_EditorHideFlags: 0 164 | m_Script: {fileID: 11500000, guid: 8ce19b2cb11f3c34ca5689f4682aebe5, type: 3} 165 | m_Name: 166 | m_EditorClassIdentifier: 167 | --- !u!4 &1116129362 168 | Transform: 169 | m_ObjectHideFlags: 0 170 | m_PrefabParentObject: {fileID: 0} 171 | m_PrefabInternal: {fileID: 0} 172 | m_GameObject: {fileID: 1116129360} 173 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 174 | m_LocalPosition: {x: 297.20258, y: 170.77058, z: -17.68} 175 | m_LocalScale: {x: 1, y: 1, z: 1} 176 | m_Children: [] 177 | m_Father: {fileID: 0} 178 | m_RootOrder: 1 179 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 180 | --- !u!1001 &1552899385 181 | Prefab: 182 | m_ObjectHideFlags: 0 183 | serializedVersion: 2 184 | m_Modification: 185 | m_TransformParent: {fileID: 0} 186 | m_Modifications: 187 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 188 | propertyPath: m_LocalPosition.x 189 | value: -7.571472 190 | objectReference: {fileID: 0} 191 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 192 | propertyPath: m_LocalPosition.y 193 | value: 8.892822 194 | objectReference: {fileID: 0} 195 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 196 | propertyPath: m_LocalPosition.z 197 | value: -3.7468758 198 | objectReference: {fileID: 0} 199 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 200 | propertyPath: m_LocalRotation.x 201 | value: 0 202 | objectReference: {fileID: 0} 203 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 204 | propertyPath: m_LocalRotation.y 205 | value: 0 206 | objectReference: {fileID: 0} 207 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 208 | propertyPath: m_LocalRotation.z 209 | value: 0 210 | objectReference: {fileID: 0} 211 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 212 | propertyPath: m_LocalRotation.w 213 | value: 1 214 | objectReference: {fileID: 0} 215 | - target: {fileID: 4708699214530786, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 216 | propertyPath: m_RootOrder 217 | value: 4 218 | objectReference: {fileID: 0} 219 | m_RemovedComponents: [] 220 | m_ParentPrefab: {fileID: 100100000, guid: ae6d20aa8e26b7b47aa89ac5ff39984e, type: 2} 221 | m_IsPrefabParent: 0 222 | --- !u!1 &1659894290 223 | GameObject: 224 | m_ObjectHideFlags: 0 225 | m_PrefabParentObject: {fileID: 0} 226 | m_PrefabInternal: {fileID: 0} 227 | serializedVersion: 5 228 | m_Component: 229 | - component: {fileID: 1659894292} 230 | - component: {fileID: 1659894291} 231 | m_Layer: 0 232 | m_Name: Directional Light 233 | m_TagString: Untagged 234 | m_Icon: {fileID: 0} 235 | m_NavMeshLayer: 0 236 | m_StaticEditorFlags: 0 237 | m_IsActive: 1 238 | --- !u!108 &1659894291 239 | Light: 240 | m_ObjectHideFlags: 0 241 | m_PrefabParentObject: {fileID: 0} 242 | m_PrefabInternal: {fileID: 0} 243 | m_GameObject: {fileID: 1659894290} 244 | m_Enabled: 1 245 | serializedVersion: 7 246 | m_Type: 1 247 | m_Color: {r: 1, g: 0.9822453, b: 0.9338235, a: 1} 248 | m_Intensity: 1 249 | m_Range: 10 250 | m_SpotAngle: 30 251 | m_CookieSize: 10 252 | m_Shadows: 253 | m_Type: 2 254 | m_Resolution: -1 255 | m_CustomResolution: -1 256 | m_Strength: 1 257 | m_Bias: 0.05 258 | m_NormalBias: 0.4 259 | m_NearPlane: 0.2 260 | m_Cookie: {fileID: 0} 261 | m_DrawHalo: 0 262 | m_Flare: {fileID: 0} 263 | m_RenderMode: 0 264 | m_CullingMask: 265 | serializedVersion: 2 266 | m_Bits: 4294967295 267 | m_Lightmapping: 4 268 | m_AreaSize: {x: 1, y: 1} 269 | m_BounceIntensity: 1 270 | m_ShadowRadius: 0 271 | m_ShadowAngle: 0 272 | --- !u!4 &1659894292 273 | Transform: 274 | m_ObjectHideFlags: 0 275 | m_PrefabParentObject: {fileID: 0} 276 | m_PrefabInternal: {fileID: 0} 277 | m_GameObject: {fileID: 1659894290} 278 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 279 | m_LocalPosition: {x: 0, y: 3, z: 0} 280 | m_LocalScale: {x: 1, y: 1, z: 1} 281 | m_Children: [] 282 | m_Father: {fileID: 0} 283 | m_RootOrder: 0 284 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 285 | --- !u!1 &1818667596 286 | GameObject: 287 | m_ObjectHideFlags: 0 288 | m_PrefabParentObject: {fileID: 0} 289 | m_PrefabInternal: {fileID: 0} 290 | serializedVersion: 5 291 | m_Component: 292 | - component: {fileID: 1818667600} 293 | - component: {fileID: 1818667599} 294 | - component: {fileID: 1818667598} 295 | - component: {fileID: 1818667597} 296 | m_Layer: 0 297 | m_Name: PlayerPlatform 298 | m_TagString: Untagged 299 | m_Icon: {fileID: 0} 300 | m_NavMeshLayer: 0 301 | m_StaticEditorFlags: 0 302 | m_IsActive: 1 303 | --- !u!23 &1818667597 304 | MeshRenderer: 305 | m_ObjectHideFlags: 0 306 | m_PrefabParentObject: {fileID: 0} 307 | m_PrefabInternal: {fileID: 0} 308 | m_GameObject: {fileID: 1818667596} 309 | m_Enabled: 1 310 | m_CastShadows: 1 311 | m_ReceiveShadows: 1 312 | m_MotionVectors: 1 313 | m_LightProbeUsage: 1 314 | m_ReflectionProbeUsage: 1 315 | m_Materials: 316 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 317 | m_StaticBatchInfo: 318 | firstSubMesh: 0 319 | subMeshCount: 0 320 | m_StaticBatchRoot: {fileID: 0} 321 | m_ProbeAnchor: {fileID: 0} 322 | m_LightProbeVolumeOverride: {fileID: 0} 323 | m_ScaleInLightmap: 1 324 | m_PreserveUVs: 1 325 | m_IgnoreNormalsForChartDetection: 0 326 | m_ImportantGI: 0 327 | m_SelectedEditorRenderState: 3 328 | m_MinimumChartSize: 4 329 | m_AutoUVMaxDistance: 0.5 330 | m_AutoUVMaxAngle: 89 331 | m_LightmapParameters: {fileID: 0} 332 | m_SortingLayerID: 0 333 | m_SortingOrder: 0 334 | --- !u!65 &1818667598 335 | BoxCollider: 336 | m_ObjectHideFlags: 0 337 | m_PrefabParentObject: {fileID: 0} 338 | m_PrefabInternal: {fileID: 0} 339 | m_GameObject: {fileID: 1818667596} 340 | m_Material: {fileID: 0} 341 | m_IsTrigger: 0 342 | m_Enabled: 1 343 | serializedVersion: 2 344 | m_Size: {x: 1, y: 1, z: 1} 345 | m_Center: {x: 0, y: 0, z: 0} 346 | --- !u!33 &1818667599 347 | MeshFilter: 348 | m_ObjectHideFlags: 0 349 | m_PrefabParentObject: {fileID: 0} 350 | m_PrefabInternal: {fileID: 0} 351 | m_GameObject: {fileID: 1818667596} 352 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 353 | --- !u!4 &1818667600 354 | Transform: 355 | m_ObjectHideFlags: 0 356 | m_PrefabParentObject: {fileID: 0} 357 | m_PrefabInternal: {fileID: 0} 358 | m_GameObject: {fileID: 1818667596} 359 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 360 | m_LocalPosition: {x: 297.20258, y: 169.465, z: -17.66} 361 | m_LocalScale: {x: 8.8024025, y: 1, z: 8.802403} 362 | m_Children: [] 363 | m_Father: {fileID: 0} 364 | m_RootOrder: 2 365 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 366 | --- !u!1 &1839631838 367 | GameObject: 368 | m_ObjectHideFlags: 0 369 | m_PrefabParentObject: {fileID: 0} 370 | m_PrefabInternal: {fileID: 0} 371 | serializedVersion: 5 372 | m_Component: 373 | - component: {fileID: 1839631840} 374 | - component: {fileID: 1839631839} 375 | m_Layer: 0 376 | m_Name: DebugSceneIndexChecker 377 | m_TagString: Untagged 378 | m_Icon: {fileID: 0} 379 | m_NavMeshLayer: 0 380 | m_StaticEditorFlags: 0 381 | m_IsActive: 1 382 | --- !u!114 &1839631839 383 | MonoBehaviour: 384 | m_ObjectHideFlags: 0 385 | m_PrefabParentObject: {fileID: 0} 386 | m_PrefabInternal: {fileID: 0} 387 | m_GameObject: {fileID: 1839631838} 388 | m_Enabled: 1 389 | m_EditorHideFlags: 0 390 | m_Script: {fileID: 11500000, guid: a6e85fa058a794942ba2fdee0e83600c, type: 3} 391 | m_Name: 392 | m_EditorClassIdentifier: 393 | buildIndexToCheck: 0 394 | --- !u!4 &1839631840 395 | Transform: 396 | m_ObjectHideFlags: 0 397 | m_PrefabParentObject: {fileID: 0} 398 | m_PrefabInternal: {fileID: 0} 399 | m_GameObject: {fileID: 1839631838} 400 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 401 | m_LocalPosition: {x: -4.93946, y: 2.9753532, z: 1.4096664} 402 | m_LocalScale: {x: 1, y: 1, z: 1} 403 | m_Children: [] 404 | m_Father: {fileID: 0} 405 | m_RootOrder: 5 406 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 407 | -------------------------------------------------------------------------------- /StartDocked/Scripts/FPEPlayerStartDocked.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Whilefun.FPEKit 6 | { 7 | 8 | // 9 | // FPEPlayerStartDocked 10 | // This script simply acts as a findable component for starting a 11 | // level where the player should start in a docked position. 12 | // 13 | // Copyright 2017 While Fun Games 14 | // http://whilefun.com 15 | // 16 | public class FPEPlayerStartDocked : MonoBehaviour 17 | { 18 | 19 | [SerializeField, Tooltip("If assigned to a dock in the scene, the player will start the game docked on this Dock object. When the player undocks from the starting dock, they will 'return' to the FPEPlayerStartDocked transform.")] 20 | private FPEInteractableDockScript startingDock = null; 21 | public FPEInteractableDockScript StartingDock { 22 | get { return startingDock; } 23 | } 24 | 25 | #if UNITY_EDITOR 26 | 27 | void OnDrawGizmos() 28 | { 29 | 30 | Color c = Color.yellow; 31 | c.a = 0.5f; 32 | Gizmos.color = c; 33 | 34 | Gizmos.DrawSphere(transform.position, 0.75f); 35 | Gizmos.DrawWireSphere(transform.position, 0.75f); 36 | Gizmos.DrawIcon(transform.position, "Whilefun/playerStart.png", false); 37 | 38 | if(startingDock != null) 39 | { 40 | c = Color.blue; 41 | Gizmos.color = c; 42 | Gizmos.DrawLine(transform.position, startingDock.DockTransform.position); 43 | } 44 | 45 | } 46 | 47 | #endif 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /StartDocked/StartDocked.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/StartDocked/StartDocked.jpg -------------------------------------------------------------------------------- /SurfaceFootsteps/Audio/PlayerFootstepsA.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 8603ff8ec41bafa4884ab55973c99b81, type: 3} 12 | m_Name: PlayerFootstepsA 13 | m_EditorClassIdentifier: 14 | clips: 15 | - {fileID: 8300000, guid: bd9c78160e4c22240b6c9b344d4d3c8d, type: 3} 16 | - {fileID: 8300000, guid: 6548ada2730f293459155e3efed65958, type: 3} 17 | - {fileID: 8300000, guid: a64a753993f3cd745aa78a8ee217881a, type: 3} 18 | - {fileID: 8300000, guid: e73bfda39984f2549a672adc30938b2c, type: 3} 19 | volume: 20 | minValue: 0.2142857 21 | maxValue: 0.41428584 22 | pitch: 23 | minValue: 0.57462007 24 | maxValue: 0.72462004 25 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Audio/PlayerFootstepsB.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 8603ff8ec41bafa4884ab55973c99b81, type: 3} 12 | m_Name: PlayerFootstepsB 13 | m_EditorClassIdentifier: 14 | clips: 15 | - {fileID: 8300000, guid: bd9c78160e4c22240b6c9b344d4d3c8d, type: 3} 16 | - {fileID: 8300000, guid: 6548ada2730f293459155e3efed65958, type: 3} 17 | - {fileID: 8300000, guid: a64a753993f3cd745aa78a8ee217881a, type: 3} 18 | - {fileID: 8300000, guid: e73bfda39984f2549a672adc30938b2c, type: 3} 19 | volume: 20 | minValue: 0.4148936 21 | maxValue: 0.61489356 22 | pitch: 23 | minValue: 1.8500001 24 | maxValue: 2 25 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Documentation/SurfaceFootsteps.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------- 2 | 1) Modify FPEFirstPersonController.cs 3 | ------------------------------------- 4 | 5 | Around line 70, add these four variables: 6 | 7 | // Custom walking surface stuff 8 | private FPESoundBank currentFootstepSounds; 9 | private float maxFootStepCheckDistance = 1.0f; 10 | private int lastWalkedSurfaceInstanceID = 0; 11 | [SerializeField, Tooltip("The layer(s) where the custom footstep volumes live. E.g. FPEFootsteps")] 12 | private LayerMask footstepsLayers; 13 | 14 | 15 | Inside the PlayFootStepAudio() function, change: 16 | 17 | footstepSounds.Play(m_AudioSource); 18 | 19 | to be: 20 | 21 | currentFootstepSounds.Play(m_AudioSource); 22 | 23 | 24 | At the end of the Update() function, add this new raycast check for WalkableSurface: 25 | 26 | 27 | // Do custom walking surface check // 28 | RaycastHit footStepsHit; 29 | 30 | if (Physics.Raycast((transform.position + transform.up * 0.5f), -transform.up, out footStepsHit, maxFootStepCheckDistance, footstepsLayers, QueryTriggerInteraction.Collide)) 31 | { 32 | if(footStepsHit.transform != null && footStepsHit.transform.gameObject.GetComponent()) 33 | { 34 | 35 | // Only swap surfaces if we are walking on one we were not previously walking on 36 | if (lastWalkedSurfaceInstanceID != footStepsHit.transform.gameObject.GetInstanceID() || lastWalkedSurfaceInstanceID == 0) 37 | { 38 | 39 | lastWalkedSurfaceInstanceID = footStepsHit.transform.gameObject.GetInstanceID(); 40 | 41 | currentFootstepSounds = footStepsHit.transform.gameObject.GetComponent().getFootSteps(); 42 | 43 | if (currentFootstepSounds == null) 44 | { 45 | Debug.LogWarning("WalkableSurface '" + footStepsHit.transform.name + "' has no footsteps assigned, reverting to defaults."); 46 | currentFootstepSounds = footstepSounds; 47 | } 48 | 49 | } 50 | 51 | } 52 | else 53 | { 54 | 55 | currentFootstepSounds = footstepSounds; 56 | lastWalkedSurfaceInstanceID = 0; 57 | 58 | } 59 | 60 | } 61 | else 62 | { 63 | 64 | // fall through is just the assigned default footsteps: 65 | currentFootstepSounds = footstepSounds; 66 | lastWalkedSurfaceInstanceID = 0; 67 | 68 | } 69 | 70 | 71 | ----------------------------------------- 72 | 2) Using WalkableSurface in your scene(s): 73 | ----------------------------------------- 74 | 75 | 1) Create a new Layer in unity called FPEFootSteps 76 | 2) In the FPEPlayerController prefab, assign FPEFootSteps layer to be the only layer assigned in the "Footsteps Layers" value in the Inspector. 77 | 3) Add a new cube to your scene, set its collider to be a trigger 78 | 4) Set the new cube's layer to be the new FPEFootsteps Layer 79 | 5) Add the included WalkableSurface script 80 | 6) Create/assign a new FPESimpleSoundBank for the associated foot step sounds for this walkable surface (I recommend just duplicating then modifying the default PlayerFootsteps that came with the kit), and assign in the inspector. See SurfaceFootsteps/Audio/FootstepsA.asset and FootstepsB.asset for examples. 81 | 7) Run your scene, and walk on the surfaces. They should make the player footsteps sound like those in the sound bank inspector assignments for each WalkableSurface. 82 | 83 | I recommend using a good default sound bank that covers most of your world's surfaces, and using custom WalkableSurfaces sparingly around your scene. The included code does this the most efficient 84 | way possible, but it still adds a raycast every frame and each surface needs to have a collider. Making the WalkableSurface objects 'Static' in the inspector will also help, as will disabling all 85 | Physics interactions in Edit -> Project Settings -> Physics. See included screenshot called "physicsLayerInteractions.jpg". 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Documentation/physicsLayerInteractions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/SurfaceFootsteps/Documentation/physicsLayerInteractions.jpg -------------------------------------------------------------------------------- /SurfaceFootsteps/Materials/SurfaceA.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: SurfaceA 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: 3000 14 | stringTagMap: 15 | RenderType: Transparent 16 | m_SavedProperties: 17 | serializedVersion: 2 18 | m_TexEnvs: 19 | - first: 20 | name: _BumpMap 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - first: 26 | name: _DetailAlbedoMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - first: 32 | name: _DetailMask 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - first: 38 | name: _DetailNormalMap 39 | second: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - first: 44 | name: _EmissionMap 45 | second: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - first: 50 | name: _MainTex 51 | second: 52 | m_Texture: {fileID: 2800000, guid: 6895dc14c1902494fb56e41a2cfaa420, type: 3} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - first: 56 | name: _MetallicGlossMap 57 | second: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - first: 62 | name: _OcclusionMap 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - first: 68 | name: _ParallaxMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | m_Floats: 74 | - first: 75 | name: _BumpScale 76 | second: 1 77 | - first: 78 | name: _Cutoff 79 | second: 0.5 80 | - first: 81 | name: _DetailNormalMapScale 82 | second: 1 83 | - first: 84 | name: _DstBlend 85 | second: 10 86 | - first: 87 | name: _GlossMapScale 88 | second: 1 89 | - first: 90 | name: _Glossiness 91 | second: 0.5 92 | - first: 93 | name: _GlossyReflections 94 | second: 0 95 | - first: 96 | name: _Metallic 97 | second: 0 98 | - first: 99 | name: _Mode 100 | second: 2 101 | - first: 102 | name: _OcclusionStrength 103 | second: 1 104 | - first: 105 | name: _Parallax 106 | second: 0.02 107 | - first: 108 | name: _SmoothnessTextureChannel 109 | second: 0 110 | - first: 111 | name: _SpecularHighlights 112 | second: 0 113 | - first: 114 | name: _SrcBlend 115 | second: 5 116 | - first: 117 | name: _UVSec 118 | second: 0 119 | - first: 120 | name: _ZWrite 121 | second: 0 122 | m_Colors: 123 | - first: 124 | name: _Color 125 | second: {r: 1, g: 1, b: 1, a: 0.7058824} 126 | - first: 127 | name: _EmissionColor 128 | second: {r: 0, g: 0, b: 0, a: 1} 129 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Materials/SurfaceB.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: SurfaceB 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: 3000 14 | stringTagMap: 15 | RenderType: Transparent 16 | m_SavedProperties: 17 | serializedVersion: 2 18 | m_TexEnvs: 19 | - first: 20 | name: _BumpMap 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - first: 26 | name: _DetailAlbedoMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - first: 32 | name: _DetailMask 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - first: 38 | name: _DetailNormalMap 39 | second: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - first: 44 | name: _EmissionMap 45 | second: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - first: 50 | name: _MainTex 51 | second: 52 | m_Texture: {fileID: 2800000, guid: 9b37465d667858845a3022e57ee177ad, type: 3} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - first: 56 | name: _MetallicGlossMap 57 | second: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - first: 62 | name: _OcclusionMap 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - first: 68 | name: _ParallaxMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | m_Floats: 74 | - first: 75 | name: _BumpScale 76 | second: 1 77 | - first: 78 | name: _Cutoff 79 | second: 0.5 80 | - first: 81 | name: _DetailNormalMapScale 82 | second: 1 83 | - first: 84 | name: _DstBlend 85 | second: 10 86 | - first: 87 | name: _GlossMapScale 88 | second: 1 89 | - first: 90 | name: _Glossiness 91 | second: 0.5 92 | - first: 93 | name: _GlossyReflections 94 | second: 0 95 | - first: 96 | name: _Metallic 97 | second: 0 98 | - first: 99 | name: _Mode 100 | second: 2 101 | - first: 102 | name: _OcclusionStrength 103 | second: 1 104 | - first: 105 | name: _Parallax 106 | second: 0.02 107 | - first: 108 | name: _SmoothnessTextureChannel 109 | second: 0 110 | - first: 111 | name: _SpecularHighlights 112 | second: 0 113 | - first: 114 | name: _SrcBlend 115 | second: 5 116 | - first: 117 | name: _UVSec 118 | second: 0 119 | - first: 120 | name: _ZWrite 121 | second: 0 122 | m_Colors: 123 | - first: 124 | name: _Color 125 | second: {r: 1, g: 1, b: 1, a: 0.7058824} 126 | - first: 127 | name: _EmissionColor 128 | second: {r: 0, g: 0, b: 0, a: 1} 129 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity v5.5.4p3+ 2 | FPEKit v2.1 3 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Scenes/WalkSurfaceTest.unity: -------------------------------------------------------------------------------- 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: 7 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.61764705, g: 0.61764705, b: 0.61764705, 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_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 0 54 | m_EnableRealtimeLightmaps: 0 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentTypeID: 0 83 | agentRadius: 0.5 84 | agentHeight: 2 85 | agentSlope: 45 86 | agentClimb: 0.4 87 | ledgeDropHeight: 0 88 | maxJumpAcrossDistance: 0 89 | minRegionArea: 2 90 | manualCellSize: 0 91 | cellSize: 0.16666667 92 | accuratePlacement: 0 93 | m_NavMeshData: {fileID: 0} 94 | --- !u!1 &221147803 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 0} 99 | serializedVersion: 5 100 | m_Component: 101 | - component: {fileID: 221147805} 102 | - component: {fileID: 221147804} 103 | m_Layer: 0 104 | m_Name: Directional Light 105 | m_TagString: Untagged 106 | m_Icon: {fileID: 0} 107 | m_NavMeshLayer: 0 108 | m_StaticEditorFlags: 0 109 | m_IsActive: 1 110 | --- !u!108 &221147804 111 | Light: 112 | m_ObjectHideFlags: 0 113 | m_PrefabParentObject: {fileID: 0} 114 | m_PrefabInternal: {fileID: 0} 115 | m_GameObject: {fileID: 221147803} 116 | m_Enabled: 1 117 | serializedVersion: 7 118 | m_Type: 1 119 | m_Color: {r: 1, g: 1, b: 1, a: 1} 120 | m_Intensity: 1 121 | m_Range: 10 122 | m_SpotAngle: 30 123 | m_CookieSize: 10 124 | m_Shadows: 125 | m_Type: 2 126 | m_Resolution: -1 127 | m_CustomResolution: -1 128 | m_Strength: 1 129 | m_Bias: 0.05 130 | m_NormalBias: 0.4 131 | m_NearPlane: 0.2 132 | m_Cookie: {fileID: 0} 133 | m_DrawHalo: 0 134 | m_Flare: {fileID: 0} 135 | m_RenderMode: 0 136 | m_CullingMask: 137 | serializedVersion: 2 138 | m_Bits: 4294967295 139 | m_Lightmapping: 4 140 | m_AreaSize: {x: 1, y: 1} 141 | m_BounceIntensity: 1 142 | m_ShadowRadius: 0 143 | m_ShadowAngle: 0 144 | --- !u!4 &221147805 145 | Transform: 146 | m_ObjectHideFlags: 0 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 0} 149 | m_GameObject: {fileID: 221147803} 150 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 151 | m_LocalPosition: {x: 0, y: 3, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_Children: [] 154 | m_Father: {fileID: 0} 155 | m_RootOrder: 0 156 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 157 | --- !u!1 &422016366 158 | GameObject: 159 | m_ObjectHideFlags: 0 160 | m_PrefabParentObject: {fileID: 0} 161 | m_PrefabInternal: {fileID: 0} 162 | serializedVersion: 5 163 | m_Component: 164 | - component: {fileID: 422016370} 165 | - component: {fileID: 422016369} 166 | - component: {fileID: 422016368} 167 | - component: {fileID: 422016367} 168 | m_Layer: 0 169 | m_Name: Plane 170 | m_TagString: Untagged 171 | m_Icon: {fileID: 0} 172 | m_NavMeshLayer: 0 173 | m_StaticEditorFlags: 0 174 | m_IsActive: 1 175 | --- !u!23 &422016367 176 | MeshRenderer: 177 | m_ObjectHideFlags: 0 178 | m_PrefabParentObject: {fileID: 0} 179 | m_PrefabInternal: {fileID: 0} 180 | m_GameObject: {fileID: 422016366} 181 | m_Enabled: 1 182 | m_CastShadows: 1 183 | m_ReceiveShadows: 1 184 | m_MotionVectors: 1 185 | m_LightProbeUsage: 1 186 | m_ReflectionProbeUsage: 1 187 | m_Materials: 188 | - {fileID: 2100000, guid: f2521483140fd684cb25837dd618e4d5, type: 2} 189 | m_StaticBatchInfo: 190 | firstSubMesh: 0 191 | subMeshCount: 0 192 | m_StaticBatchRoot: {fileID: 0} 193 | m_ProbeAnchor: {fileID: 0} 194 | m_LightProbeVolumeOverride: {fileID: 0} 195 | m_ScaleInLightmap: 1 196 | m_PreserveUVs: 1 197 | m_IgnoreNormalsForChartDetection: 0 198 | m_ImportantGI: 0 199 | m_SelectedEditorRenderState: 3 200 | m_MinimumChartSize: 4 201 | m_AutoUVMaxDistance: 0.5 202 | m_AutoUVMaxAngle: 89 203 | m_LightmapParameters: {fileID: 0} 204 | m_SortingLayerID: 0 205 | m_SortingOrder: 0 206 | --- !u!64 &422016368 207 | MeshCollider: 208 | m_ObjectHideFlags: 0 209 | m_PrefabParentObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 0} 211 | m_GameObject: {fileID: 422016366} 212 | m_Material: {fileID: 0} 213 | m_IsTrigger: 0 214 | m_Enabled: 1 215 | serializedVersion: 2 216 | m_Convex: 0 217 | m_InflateMesh: 0 218 | m_SkinWidth: 0.01 219 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 220 | --- !u!33 &422016369 221 | MeshFilter: 222 | m_ObjectHideFlags: 0 223 | m_PrefabParentObject: {fileID: 0} 224 | m_PrefabInternal: {fileID: 0} 225 | m_GameObject: {fileID: 422016366} 226 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 227 | --- !u!4 &422016370 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_PrefabParentObject: {fileID: 0} 231 | m_PrefabInternal: {fileID: 0} 232 | m_GameObject: {fileID: 422016366} 233 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 234 | m_LocalPosition: {x: 0, y: 0, z: 0} 235 | m_LocalScale: {x: 5, y: 5, z: 5} 236 | m_Children: [] 237 | m_Father: {fileID: 0} 238 | m_RootOrder: 1 239 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 240 | --- !u!1 &706242313 241 | GameObject: 242 | m_ObjectHideFlags: 0 243 | m_PrefabParentObject: {fileID: 0} 244 | m_PrefabInternal: {fileID: 0} 245 | serializedVersion: 5 246 | m_Component: 247 | - component: {fileID: 706242317} 248 | - component: {fileID: 706242316} 249 | - component: {fileID: 706242315} 250 | - component: {fileID: 706242314} 251 | - component: {fileID: 706242318} 252 | m_Layer: 13 253 | m_Name: WalkSurfaceA 254 | m_TagString: Untagged 255 | m_Icon: {fileID: 0} 256 | m_NavMeshLayer: 0 257 | m_StaticEditorFlags: 0 258 | m_IsActive: 1 259 | --- !u!23 &706242314 260 | MeshRenderer: 261 | m_ObjectHideFlags: 0 262 | m_PrefabParentObject: {fileID: 0} 263 | m_PrefabInternal: {fileID: 0} 264 | m_GameObject: {fileID: 706242313} 265 | m_Enabled: 1 266 | m_CastShadows: 0 267 | m_ReceiveShadows: 0 268 | m_MotionVectors: 2 269 | m_LightProbeUsage: 0 270 | m_ReflectionProbeUsage: 0 271 | m_Materials: 272 | - {fileID: 2100000, guid: 46b700e2a6305544e9c82b890000ae9c, type: 2} 273 | m_StaticBatchInfo: 274 | firstSubMesh: 0 275 | subMeshCount: 0 276 | m_StaticBatchRoot: {fileID: 0} 277 | m_ProbeAnchor: {fileID: 0} 278 | m_LightProbeVolumeOverride: {fileID: 0} 279 | m_ScaleInLightmap: 1 280 | m_PreserveUVs: 1 281 | m_IgnoreNormalsForChartDetection: 0 282 | m_ImportantGI: 0 283 | m_SelectedEditorRenderState: 3 284 | m_MinimumChartSize: 4 285 | m_AutoUVMaxDistance: 0.5 286 | m_AutoUVMaxAngle: 89 287 | m_LightmapParameters: {fileID: 0} 288 | m_SortingLayerID: 0 289 | m_SortingOrder: 0 290 | --- !u!65 &706242315 291 | BoxCollider: 292 | m_ObjectHideFlags: 0 293 | m_PrefabParentObject: {fileID: 0} 294 | m_PrefabInternal: {fileID: 0} 295 | m_GameObject: {fileID: 706242313} 296 | m_Material: {fileID: 0} 297 | m_IsTrigger: 1 298 | m_Enabled: 1 299 | serializedVersion: 2 300 | m_Size: {x: 1, y: 1, z: 1} 301 | m_Center: {x: 0, y: 0, z: 0} 302 | --- !u!33 &706242316 303 | MeshFilter: 304 | m_ObjectHideFlags: 0 305 | m_PrefabParentObject: {fileID: 0} 306 | m_PrefabInternal: {fileID: 0} 307 | m_GameObject: {fileID: 706242313} 308 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 309 | --- !u!4 &706242317 310 | Transform: 311 | m_ObjectHideFlags: 0 312 | m_PrefabParentObject: {fileID: 0} 313 | m_PrefabInternal: {fileID: 0} 314 | m_GameObject: {fileID: 706242313} 315 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 316 | m_LocalPosition: {x: 0.06502995, y: 0.32, z: 17.5} 317 | m_LocalScale: {x: 9.726761, y: 0.7272276, z: 7.8318963} 318 | m_Children: [] 319 | m_Father: {fileID: 0} 320 | m_RootOrder: 3 321 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 322 | --- !u!114 &706242318 323 | MonoBehaviour: 324 | m_ObjectHideFlags: 0 325 | m_PrefabParentObject: {fileID: 0} 326 | m_PrefabInternal: {fileID: 0} 327 | m_GameObject: {fileID: 706242313} 328 | m_Enabled: 1 329 | m_EditorHideFlags: 0 330 | m_Script: {fileID: 11500000, guid: 2e819b17586a037448cdf1138a143016, type: 3} 331 | m_Name: 332 | m_EditorClassIdentifier: 333 | myFootsteps: {fileID: 11400000, guid: f318b7b47797cd547b843b975cc427ee, type: 2} 334 | --- !u!1001 &1398478243 335 | Prefab: 336 | m_ObjectHideFlags: 0 337 | serializedVersion: 2 338 | m_Modification: 339 | m_TransformParent: {fileID: 0} 340 | m_Modifications: 341 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 342 | propertyPath: m_LocalPosition.x 343 | value: 0 344 | objectReference: {fileID: 0} 345 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 346 | propertyPath: m_LocalPosition.y 347 | value: 0 348 | objectReference: {fileID: 0} 349 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 350 | propertyPath: m_LocalPosition.z 351 | value: 0 352 | objectReference: {fileID: 0} 353 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 354 | propertyPath: m_LocalRotation.x 355 | value: 0 356 | objectReference: {fileID: 0} 357 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 358 | propertyPath: m_LocalRotation.y 359 | value: 0 360 | objectReference: {fileID: 0} 361 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 362 | propertyPath: m_LocalRotation.z 363 | value: 0 364 | objectReference: {fileID: 0} 365 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 366 | propertyPath: m_LocalRotation.w 367 | value: 1 368 | objectReference: {fileID: 0} 369 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 370 | propertyPath: m_RootOrder 371 | value: 2 372 | objectReference: {fileID: 0} 373 | m_RemovedComponents: [] 374 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 375 | m_IsPrefabParent: 0 376 | --- !u!1 &1619242688 377 | GameObject: 378 | m_ObjectHideFlags: 0 379 | m_PrefabParentObject: {fileID: 0} 380 | m_PrefabInternal: {fileID: 0} 381 | serializedVersion: 5 382 | m_Component: 383 | - component: {fileID: 1619242692} 384 | - component: {fileID: 1619242691} 385 | - component: {fileID: 1619242690} 386 | - component: {fileID: 1619242689} 387 | - component: {fileID: 1619242693} 388 | m_Layer: 13 389 | m_Name: WalkSurfaceB 390 | m_TagString: Untagged 391 | m_Icon: {fileID: 0} 392 | m_NavMeshLayer: 0 393 | m_StaticEditorFlags: 0 394 | m_IsActive: 1 395 | --- !u!23 &1619242689 396 | MeshRenderer: 397 | m_ObjectHideFlags: 0 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | m_GameObject: {fileID: 1619242688} 401 | m_Enabled: 1 402 | m_CastShadows: 0 403 | m_ReceiveShadows: 0 404 | m_MotionVectors: 2 405 | m_LightProbeUsage: 0 406 | m_ReflectionProbeUsage: 0 407 | m_Materials: 408 | - {fileID: 2100000, guid: e4599500236fa6b4286ba59fdabc4977, type: 2} 409 | m_StaticBatchInfo: 410 | firstSubMesh: 0 411 | subMeshCount: 0 412 | m_StaticBatchRoot: {fileID: 0} 413 | m_ProbeAnchor: {fileID: 0} 414 | m_LightProbeVolumeOverride: {fileID: 0} 415 | m_ScaleInLightmap: 1 416 | m_PreserveUVs: 1 417 | m_IgnoreNormalsForChartDetection: 0 418 | m_ImportantGI: 0 419 | m_SelectedEditorRenderState: 3 420 | m_MinimumChartSize: 4 421 | m_AutoUVMaxDistance: 0.5 422 | m_AutoUVMaxAngle: 89 423 | m_LightmapParameters: {fileID: 0} 424 | m_SortingLayerID: 0 425 | m_SortingOrder: 0 426 | --- !u!65 &1619242690 427 | BoxCollider: 428 | m_ObjectHideFlags: 0 429 | m_PrefabParentObject: {fileID: 0} 430 | m_PrefabInternal: {fileID: 0} 431 | m_GameObject: {fileID: 1619242688} 432 | m_Material: {fileID: 0} 433 | m_IsTrigger: 1 434 | m_Enabled: 1 435 | serializedVersion: 2 436 | m_Size: {x: 1, y: 1, z: 1} 437 | m_Center: {x: 0, y: 0, z: 0} 438 | --- !u!33 &1619242691 439 | MeshFilter: 440 | m_ObjectHideFlags: 0 441 | m_PrefabParentObject: {fileID: 0} 442 | m_PrefabInternal: {fileID: 0} 443 | m_GameObject: {fileID: 1619242688} 444 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 445 | --- !u!4 &1619242692 446 | Transform: 447 | m_ObjectHideFlags: 0 448 | m_PrefabParentObject: {fileID: 0} 449 | m_PrefabInternal: {fileID: 0} 450 | m_GameObject: {fileID: 1619242688} 451 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 452 | m_LocalPosition: {x: 0.06502995, y: 0.32, z: 7.9333596} 453 | m_LocalScale: {x: 9.726761, y: 0.7272276, z: 7.8318963} 454 | m_Children: [] 455 | m_Father: {fileID: 0} 456 | m_RootOrder: 4 457 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 458 | --- !u!114 &1619242693 459 | MonoBehaviour: 460 | m_ObjectHideFlags: 0 461 | m_PrefabParentObject: {fileID: 0} 462 | m_PrefabInternal: {fileID: 0} 463 | m_GameObject: {fileID: 1619242688} 464 | m_Enabled: 1 465 | m_EditorHideFlags: 0 466 | m_Script: {fileID: 11500000, guid: 2e819b17586a037448cdf1138a143016, type: 3} 467 | m_Name: 468 | m_EditorClassIdentifier: 469 | myFootsteps: {fileID: 11400000, guid: d21b98c198c73884cae43c3b7b6bde27, type: 2} 470 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Scripts/WalkableSurface.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using Whilefun.FPEKit; 6 | 7 | public class WalkableSurface : MonoBehaviour { 8 | 9 | [SerializeField, Tooltip("The sound bank of footsteps you want this surface to have")] 10 | private FPESoundBank myFootsteps; 11 | 12 | public FPESoundBank getFootSteps() 13 | { 14 | return myFootsteps; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /SurfaceFootsteps/Textures/surfaceA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/SurfaceFootsteps/Textures/surfaceA.png -------------------------------------------------------------------------------- /SurfaceFootsteps/Textures/surfaceB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/SurfaceFootsteps/Textures/surfaceB.png -------------------------------------------------------------------------------- /Teleport/Prefabs/Teleport.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1837055103017884} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1029661731870356 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4845139814312492} 22 | m_Layer: 0 23 | m_Name: Destination 24 | m_TagString: Untagged 25 | m_Icon: {fileID: 0} 26 | m_NavMeshLayer: 0 27 | m_StaticEditorFlags: 0 28 | m_IsActive: 1 29 | --- !u!1 &1192840574926808 30 | GameObject: 31 | m_ObjectHideFlags: 1 32 | m_PrefabParentObject: {fileID: 0} 33 | m_PrefabInternal: {fileID: 100100000} 34 | serializedVersion: 5 35 | m_Component: 36 | - component: {fileID: 4276152042519758} 37 | - component: {fileID: 33020801925279332} 38 | - component: {fileID: 65201832296499272} 39 | - component: {fileID: 23862283337400796} 40 | m_Layer: 0 41 | m_Name: Cube 42 | m_TagString: Untagged 43 | m_Icon: {fileID: 0} 44 | m_NavMeshLayer: 0 45 | m_StaticEditorFlags: 0 46 | m_IsActive: 1 47 | --- !u!1 &1203909268421728 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_PrefabParentObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | serializedVersion: 5 53 | m_Component: 54 | - component: {fileID: 4087309243023910} 55 | m_Layer: 0 56 | m_Name: Decorations 57 | m_TagString: Untagged 58 | m_Icon: {fileID: 0} 59 | m_NavMeshLayer: 0 60 | m_StaticEditorFlags: 0 61 | m_IsActive: 1 62 | --- !u!1 &1540756861488404 63 | GameObject: 64 | m_ObjectHideFlags: 1 65 | m_PrefabParentObject: {fileID: 0} 66 | m_PrefabInternal: {fileID: 100100000} 67 | serializedVersion: 5 68 | m_Component: 69 | - component: {fileID: 4221947127900470} 70 | - component: {fileID: 33575261615154646} 71 | - component: {fileID: 65525520288246606} 72 | - component: {fileID: 23992758526469456} 73 | m_Layer: 0 74 | m_Name: Cube (2) 75 | m_TagString: Untagged 76 | m_Icon: {fileID: 0} 77 | m_NavMeshLayer: 0 78 | m_StaticEditorFlags: 0 79 | m_IsActive: 1 80 | --- !u!1 &1799196046166188 81 | GameObject: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | serializedVersion: 5 86 | m_Component: 87 | - component: {fileID: 4664204829879454} 88 | - component: {fileID: 33973546063469492} 89 | - component: {fileID: 65568132351733152} 90 | - component: {fileID: 23569835995677220} 91 | m_Layer: 0 92 | m_Name: Cube (1) 93 | m_TagString: Untagged 94 | m_Icon: {fileID: 0} 95 | m_NavMeshLayer: 0 96 | m_StaticEditorFlags: 0 97 | m_IsActive: 1 98 | --- !u!1 &1837055103017884 99 | GameObject: 100 | m_ObjectHideFlags: 0 101 | m_PrefabParentObject: {fileID: 0} 102 | m_PrefabInternal: {fileID: 100100000} 103 | serializedVersion: 5 104 | m_Component: 105 | - component: {fileID: 4348546006848248} 106 | - component: {fileID: 65963023393642426} 107 | - component: {fileID: 114620388915771132} 108 | m_Layer: 0 109 | m_Name: Teleport 110 | m_TagString: Untagged 111 | m_Icon: {fileID: 0} 112 | m_NavMeshLayer: 0 113 | m_StaticEditorFlags: 0 114 | m_IsActive: 1 115 | --- !u!4 &4087309243023910 116 | Transform: 117 | m_ObjectHideFlags: 1 118 | m_PrefabParentObject: {fileID: 0} 119 | m_PrefabInternal: {fileID: 100100000} 120 | m_GameObject: {fileID: 1203909268421728} 121 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 122 | m_LocalPosition: {x: 0, y: 0, z: 0} 123 | m_LocalScale: {x: 1, y: 1, z: 1} 124 | m_Children: 125 | - {fileID: 4276152042519758} 126 | - {fileID: 4664204829879454} 127 | - {fileID: 4221947127900470} 128 | m_Father: {fileID: 4348546006848248} 129 | m_RootOrder: 1 130 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 131 | --- !u!4 &4221947127900470 132 | Transform: 133 | m_ObjectHideFlags: 1 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 100100000} 136 | m_GameObject: {fileID: 1540756861488404} 137 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 138 | m_LocalPosition: {x: -0.091, y: 0.464, z: 0} 139 | m_LocalScale: {x: 1.2366866, y: 0.22113322, z: 1.22631} 140 | m_Children: [] 141 | m_Father: {fileID: 4087309243023910} 142 | m_RootOrder: 2 143 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 144 | --- !u!4 &4276152042519758 145 | Transform: 146 | m_ObjectHideFlags: 1 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 100100000} 149 | m_GameObject: {fileID: 1192840574926808} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: -0.59, y: -0.083, z: -0} 152 | m_LocalScale: {x: 0.2849597, y: 1.3144728, z: 1.2263117} 153 | m_Children: [] 154 | m_Father: {fileID: 4087309243023910} 155 | m_RootOrder: 0 156 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 157 | --- !u!4 &4348546006848248 158 | Transform: 159 | m_ObjectHideFlags: 1 160 | m_PrefabParentObject: {fileID: 0} 161 | m_PrefabInternal: {fileID: 100100000} 162 | m_GameObject: {fileID: 1837055103017884} 163 | m_LocalRotation: {x: -0, y: 0.12939028, z: -0, w: 0.9915937} 164 | m_LocalPosition: {x: 2.78, y: 1.63, z: 1.65} 165 | m_LocalScale: {x: 1.9218736, y: 2.3077738, z: 1} 166 | m_Children: 167 | - {fileID: 4845139814312492} 168 | - {fileID: 4087309243023910} 169 | m_Father: {fileID: 0} 170 | m_RootOrder: 0 171 | m_LocalEulerAnglesHint: {x: 0, y: 14.869, z: 0} 172 | --- !u!4 &4664204829879454 173 | Transform: 174 | m_ObjectHideFlags: 1 175 | m_PrefabParentObject: {fileID: 0} 176 | m_PrefabInternal: {fileID: 100100000} 177 | m_GameObject: {fileID: 1799196046166188} 178 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 179 | m_LocalPosition: {x: 0.456, y: -0.083000004, z: -0} 180 | m_LocalScale: {x: 0.2849615, y: 1.3144746, z: 1.22631} 181 | m_Children: [] 182 | m_Father: {fileID: 4087309243023910} 183 | m_RootOrder: 1 184 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 185 | --- !u!4 &4845139814312492 186 | Transform: 187 | m_ObjectHideFlags: 1 188 | m_PrefabParentObject: {fileID: 0} 189 | m_PrefabInternal: {fileID: 100100000} 190 | m_GameObject: {fileID: 1029661731870356} 191 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 192 | m_LocalPosition: {x: 0, y: -0.28, z: -15.85} 193 | m_LocalScale: {x: 1, y: 1, z: 1} 194 | m_Children: [] 195 | m_Father: {fileID: 4348546006848248} 196 | m_RootOrder: 0 197 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 198 | --- !u!23 &23569835995677220 199 | MeshRenderer: 200 | m_ObjectHideFlags: 1 201 | m_PrefabParentObject: {fileID: 0} 202 | m_PrefabInternal: {fileID: 100100000} 203 | m_GameObject: {fileID: 1799196046166188} 204 | m_Enabled: 1 205 | m_CastShadows: 1 206 | m_ReceiveShadows: 1 207 | m_MotionVectors: 1 208 | m_LightProbeUsage: 1 209 | m_ReflectionProbeUsage: 1 210 | m_Materials: 211 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 212 | m_StaticBatchInfo: 213 | firstSubMesh: 0 214 | subMeshCount: 0 215 | m_StaticBatchRoot: {fileID: 0} 216 | m_ProbeAnchor: {fileID: 0} 217 | m_LightProbeVolumeOverride: {fileID: 0} 218 | m_ScaleInLightmap: 1 219 | m_PreserveUVs: 1 220 | m_IgnoreNormalsForChartDetection: 0 221 | m_ImportantGI: 0 222 | m_SelectedEditorRenderState: 3 223 | m_MinimumChartSize: 4 224 | m_AutoUVMaxDistance: 0.5 225 | m_AutoUVMaxAngle: 89 226 | m_LightmapParameters: {fileID: 0} 227 | m_SortingLayerID: 0 228 | m_SortingOrder: 0 229 | --- !u!23 &23862283337400796 230 | MeshRenderer: 231 | m_ObjectHideFlags: 1 232 | m_PrefabParentObject: {fileID: 0} 233 | m_PrefabInternal: {fileID: 100100000} 234 | m_GameObject: {fileID: 1192840574926808} 235 | m_Enabled: 1 236 | m_CastShadows: 1 237 | m_ReceiveShadows: 1 238 | m_MotionVectors: 1 239 | m_LightProbeUsage: 1 240 | m_ReflectionProbeUsage: 1 241 | m_Materials: 242 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 243 | m_StaticBatchInfo: 244 | firstSubMesh: 0 245 | subMeshCount: 0 246 | m_StaticBatchRoot: {fileID: 0} 247 | m_ProbeAnchor: {fileID: 0} 248 | m_LightProbeVolumeOverride: {fileID: 0} 249 | m_ScaleInLightmap: 1 250 | m_PreserveUVs: 1 251 | m_IgnoreNormalsForChartDetection: 0 252 | m_ImportantGI: 0 253 | m_SelectedEditorRenderState: 3 254 | m_MinimumChartSize: 4 255 | m_AutoUVMaxDistance: 0.5 256 | m_AutoUVMaxAngle: 89 257 | m_LightmapParameters: {fileID: 0} 258 | m_SortingLayerID: 0 259 | m_SortingOrder: 0 260 | --- !u!23 &23992758526469456 261 | MeshRenderer: 262 | m_ObjectHideFlags: 1 263 | m_PrefabParentObject: {fileID: 0} 264 | m_PrefabInternal: {fileID: 100100000} 265 | m_GameObject: {fileID: 1540756861488404} 266 | m_Enabled: 1 267 | m_CastShadows: 1 268 | m_ReceiveShadows: 1 269 | m_MotionVectors: 1 270 | m_LightProbeUsage: 1 271 | m_ReflectionProbeUsage: 1 272 | m_Materials: 273 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 274 | m_StaticBatchInfo: 275 | firstSubMesh: 0 276 | subMeshCount: 0 277 | m_StaticBatchRoot: {fileID: 0} 278 | m_ProbeAnchor: {fileID: 0} 279 | m_LightProbeVolumeOverride: {fileID: 0} 280 | m_ScaleInLightmap: 1 281 | m_PreserveUVs: 1 282 | m_IgnoreNormalsForChartDetection: 0 283 | m_ImportantGI: 0 284 | m_SelectedEditorRenderState: 3 285 | m_MinimumChartSize: 4 286 | m_AutoUVMaxDistance: 0.5 287 | m_AutoUVMaxAngle: 89 288 | m_LightmapParameters: {fileID: 0} 289 | m_SortingLayerID: 0 290 | m_SortingOrder: 0 291 | --- !u!33 &33020801925279332 292 | MeshFilter: 293 | m_ObjectHideFlags: 1 294 | m_PrefabParentObject: {fileID: 0} 295 | m_PrefabInternal: {fileID: 100100000} 296 | m_GameObject: {fileID: 1192840574926808} 297 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 298 | --- !u!33 &33575261615154646 299 | MeshFilter: 300 | m_ObjectHideFlags: 1 301 | m_PrefabParentObject: {fileID: 0} 302 | m_PrefabInternal: {fileID: 100100000} 303 | m_GameObject: {fileID: 1540756861488404} 304 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 305 | --- !u!33 &33973546063469492 306 | MeshFilter: 307 | m_ObjectHideFlags: 1 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 100100000} 310 | m_GameObject: {fileID: 1799196046166188} 311 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 312 | --- !u!65 &65201832296499272 313 | BoxCollider: 314 | m_ObjectHideFlags: 1 315 | m_PrefabParentObject: {fileID: 0} 316 | m_PrefabInternal: {fileID: 100100000} 317 | m_GameObject: {fileID: 1192840574926808} 318 | m_Material: {fileID: 0} 319 | m_IsTrigger: 0 320 | m_Enabled: 1 321 | serializedVersion: 2 322 | m_Size: {x: 1, y: 1, z: 1} 323 | m_Center: {x: 0, y: 0, z: 0} 324 | --- !u!65 &65525520288246606 325 | BoxCollider: 326 | m_ObjectHideFlags: 1 327 | m_PrefabParentObject: {fileID: 0} 328 | m_PrefabInternal: {fileID: 100100000} 329 | m_GameObject: {fileID: 1540756861488404} 330 | m_Material: {fileID: 0} 331 | m_IsTrigger: 0 332 | m_Enabled: 1 333 | serializedVersion: 2 334 | m_Size: {x: 1, y: 1, z: 1} 335 | m_Center: {x: 0, y: 0, z: 0} 336 | --- !u!65 &65568132351733152 337 | BoxCollider: 338 | m_ObjectHideFlags: 1 339 | m_PrefabParentObject: {fileID: 0} 340 | m_PrefabInternal: {fileID: 100100000} 341 | m_GameObject: {fileID: 1799196046166188} 342 | m_Material: {fileID: 0} 343 | m_IsTrigger: 0 344 | m_Enabled: 1 345 | serializedVersion: 2 346 | m_Size: {x: 1, y: 1, z: 1} 347 | m_Center: {x: 0, y: 0, z: 0} 348 | --- !u!65 &65963023393642426 349 | BoxCollider: 350 | m_ObjectHideFlags: 1 351 | m_PrefabParentObject: {fileID: 0} 352 | m_PrefabInternal: {fileID: 100100000} 353 | m_GameObject: {fileID: 1837055103017884} 354 | m_Material: {fileID: 0} 355 | m_IsTrigger: 0 356 | m_Enabled: 1 357 | serializedVersion: 2 358 | m_Size: {x: 1, y: 1, z: 1} 359 | m_Center: {x: 0, y: 0, z: 0} 360 | --- !u!114 &114620388915771132 361 | MonoBehaviour: 362 | m_ObjectHideFlags: 1 363 | m_PrefabParentObject: {fileID: 0} 364 | m_PrefabInternal: {fileID: 100100000} 365 | m_GameObject: {fileID: 1837055103017884} 366 | m_Enabled: 1 367 | m_EditorHideFlags: 0 368 | m_Script: {fileID: 11500000, guid: 3b1ee56ee2fc64543afe6b0de48a4edb, type: 3} 369 | m_Name: 370 | m_EditorClassIdentifier: 371 | destinationTransform: {fileID: 4845139814312492} 372 | forceLookReset: 1 373 | -------------------------------------------------------------------------------- /Teleport/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity v5.5.4p3+ 2 | FPEKit v2.0.2 3 | -------------------------------------------------------------------------------- /Teleport/Scenes/Teleport.unity: -------------------------------------------------------------------------------- 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: 7 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.6397059, g: 0.6397059, b: 0.6397059, 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_SkyboxMaterial: {fileID: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 1 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentTypeID: 0 83 | agentRadius: 0.5 84 | agentHeight: 2 85 | agentSlope: 45 86 | agentClimb: 0.4 87 | ledgeDropHeight: 0 88 | maxJumpAcrossDistance: 0 89 | minRegionArea: 2 90 | manualCellSize: 0 91 | cellSize: 0.16666667 92 | accuratePlacement: 0 93 | m_NavMeshData: {fileID: 0} 94 | --- !u!1 &620011929 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_PrefabParentObject: {fileID: 0} 98 | m_PrefabInternal: {fileID: 0} 99 | serializedVersion: 5 100 | m_Component: 101 | - component: {fileID: 620011931} 102 | - component: {fileID: 620011930} 103 | m_Layer: 0 104 | m_Name: Directional Light 105 | m_TagString: Untagged 106 | m_Icon: {fileID: 0} 107 | m_NavMeshLayer: 0 108 | m_StaticEditorFlags: 0 109 | m_IsActive: 1 110 | --- !u!108 &620011930 111 | Light: 112 | m_ObjectHideFlags: 0 113 | m_PrefabParentObject: {fileID: 0} 114 | m_PrefabInternal: {fileID: 0} 115 | m_GameObject: {fileID: 620011929} 116 | m_Enabled: 1 117 | serializedVersion: 7 118 | m_Type: 1 119 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 120 | m_Intensity: 1 121 | m_Range: 10 122 | m_SpotAngle: 30 123 | m_CookieSize: 10 124 | m_Shadows: 125 | m_Type: 2 126 | m_Resolution: -1 127 | m_CustomResolution: -1 128 | m_Strength: 1 129 | m_Bias: 0.05 130 | m_NormalBias: 0.4 131 | m_NearPlane: 0.2 132 | m_Cookie: {fileID: 0} 133 | m_DrawHalo: 0 134 | m_Flare: {fileID: 0} 135 | m_RenderMode: 0 136 | m_CullingMask: 137 | serializedVersion: 2 138 | m_Bits: 4294967295 139 | m_Lightmapping: 4 140 | m_AreaSize: {x: 1, y: 1} 141 | m_BounceIntensity: 1 142 | m_ShadowRadius: 0 143 | m_ShadowAngle: 0 144 | --- !u!4 &620011931 145 | Transform: 146 | m_ObjectHideFlags: 0 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 0} 149 | m_GameObject: {fileID: 620011929} 150 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 151 | m_LocalPosition: {x: 0, y: 3, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_Children: [] 154 | m_Father: {fileID: 0} 155 | m_RootOrder: 0 156 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 157 | --- !u!1001 &803505374 158 | Prefab: 159 | m_ObjectHideFlags: 0 160 | serializedVersion: 2 161 | m_Modification: 162 | m_TransformParent: {fileID: 0} 163 | m_Modifications: 164 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 165 | propertyPath: m_LocalPosition.x 166 | value: 0 167 | objectReference: {fileID: 0} 168 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 169 | propertyPath: m_LocalPosition.y 170 | value: 0 171 | objectReference: {fileID: 0} 172 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 173 | propertyPath: m_LocalPosition.z 174 | value: 0 175 | objectReference: {fileID: 0} 176 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 177 | propertyPath: m_LocalRotation.x 178 | value: 0 179 | objectReference: {fileID: 0} 180 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 181 | propertyPath: m_LocalRotation.y 182 | value: 0 183 | objectReference: {fileID: 0} 184 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 185 | propertyPath: m_LocalRotation.z 186 | value: 0 187 | objectReference: {fileID: 0} 188 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 189 | propertyPath: m_LocalRotation.w 190 | value: 1 191 | objectReference: {fileID: 0} 192 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 193 | propertyPath: m_RootOrder 194 | value: 3 195 | objectReference: {fileID: 0} 196 | m_RemovedComponents: [] 197 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 198 | m_IsPrefabParent: 0 199 | --- !u!1 &1467543746 200 | GameObject: 201 | m_ObjectHideFlags: 0 202 | m_PrefabParentObject: {fileID: 0} 203 | m_PrefabInternal: {fileID: 0} 204 | serializedVersion: 5 205 | m_Component: 206 | - component: {fileID: 1467543750} 207 | - component: {fileID: 1467543749} 208 | - component: {fileID: 1467543748} 209 | - component: {fileID: 1467543747} 210 | m_Layer: 0 211 | m_Name: Plane 212 | m_TagString: Untagged 213 | m_Icon: {fileID: 0} 214 | m_NavMeshLayer: 0 215 | m_StaticEditorFlags: 0 216 | m_IsActive: 1 217 | --- !u!23 &1467543747 218 | MeshRenderer: 219 | m_ObjectHideFlags: 0 220 | m_PrefabParentObject: {fileID: 0} 221 | m_PrefabInternal: {fileID: 0} 222 | m_GameObject: {fileID: 1467543746} 223 | m_Enabled: 1 224 | m_CastShadows: 1 225 | m_ReceiveShadows: 1 226 | m_MotionVectors: 1 227 | m_LightProbeUsage: 1 228 | m_ReflectionProbeUsage: 1 229 | m_Materials: 230 | - {fileID: 2100000, guid: f2521483140fd684cb25837dd618e4d5, type: 2} 231 | m_StaticBatchInfo: 232 | firstSubMesh: 0 233 | subMeshCount: 0 234 | m_StaticBatchRoot: {fileID: 0} 235 | m_ProbeAnchor: {fileID: 0} 236 | m_LightProbeVolumeOverride: {fileID: 0} 237 | m_ScaleInLightmap: 1 238 | m_PreserveUVs: 1 239 | m_IgnoreNormalsForChartDetection: 0 240 | m_ImportantGI: 0 241 | m_SelectedEditorRenderState: 3 242 | m_MinimumChartSize: 4 243 | m_AutoUVMaxDistance: 0.5 244 | m_AutoUVMaxAngle: 89 245 | m_LightmapParameters: {fileID: 0} 246 | m_SortingLayerID: 0 247 | m_SortingOrder: 0 248 | --- !u!64 &1467543748 249 | MeshCollider: 250 | m_ObjectHideFlags: 0 251 | m_PrefabParentObject: {fileID: 0} 252 | m_PrefabInternal: {fileID: 0} 253 | m_GameObject: {fileID: 1467543746} 254 | m_Material: {fileID: 0} 255 | m_IsTrigger: 0 256 | m_Enabled: 1 257 | serializedVersion: 2 258 | m_Convex: 0 259 | m_InflateMesh: 0 260 | m_SkinWidth: 0.01 261 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 262 | --- !u!33 &1467543749 263 | MeshFilter: 264 | m_ObjectHideFlags: 0 265 | m_PrefabParentObject: {fileID: 0} 266 | m_PrefabInternal: {fileID: 0} 267 | m_GameObject: {fileID: 1467543746} 268 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 269 | --- !u!4 &1467543750 270 | Transform: 271 | m_ObjectHideFlags: 0 272 | m_PrefabParentObject: {fileID: 0} 273 | m_PrefabInternal: {fileID: 0} 274 | m_GameObject: {fileID: 1467543746} 275 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 276 | m_LocalPosition: {x: 0, y: 0, z: 0} 277 | m_LocalScale: {x: 5, y: 5, z: 5} 278 | m_Children: [] 279 | m_Father: {fileID: 0} 280 | m_RootOrder: 1 281 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 282 | --- !u!1 &2068984212 283 | GameObject: 284 | m_ObjectHideFlags: 0 285 | m_PrefabParentObject: {fileID: 0} 286 | m_PrefabInternal: {fileID: 0} 287 | serializedVersion: 5 288 | m_Component: 289 | - component: {fileID: 2068984214} 290 | - component: {fileID: 2068984213} 291 | m_Layer: 0 292 | m_Name: PlayerStart 293 | m_TagString: Untagged 294 | m_Icon: {fileID: 0} 295 | m_NavMeshLayer: 0 296 | m_StaticEditorFlags: 0 297 | m_IsActive: 1 298 | --- !u!114 &2068984213 299 | MonoBehaviour: 300 | m_ObjectHideFlags: 0 301 | m_PrefabParentObject: {fileID: 0} 302 | m_PrefabInternal: {fileID: 0} 303 | m_GameObject: {fileID: 2068984212} 304 | m_Enabled: 1 305 | m_EditorHideFlags: 0 306 | m_Script: {fileID: 11500000, guid: 8ce19b2cb11f3c34ca5689f4682aebe5, type: 3} 307 | m_Name: 308 | m_EditorClassIdentifier: 309 | --- !u!4 &2068984214 310 | Transform: 311 | m_ObjectHideFlags: 0 312 | m_PrefabParentObject: {fileID: 0} 313 | m_PrefabInternal: {fileID: 0} 314 | m_GameObject: {fileID: 2068984212} 315 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 316 | m_LocalPosition: {x: 0, y: 0.12, z: -3.63} 317 | m_LocalScale: {x: 1, y: 1, z: 1} 318 | m_Children: [] 319 | m_Father: {fileID: 0} 320 | m_RootOrder: 2 321 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 322 | --- !u!1001 &2144316489 323 | Prefab: 324 | m_ObjectHideFlags: 0 325 | serializedVersion: 2 326 | m_Modification: 327 | m_TransformParent: {fileID: 0} 328 | m_Modifications: 329 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 330 | propertyPath: m_LocalPosition.x 331 | value: 2.78 332 | objectReference: {fileID: 0} 333 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 334 | propertyPath: m_LocalPosition.y 335 | value: 1.63 336 | objectReference: {fileID: 0} 337 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 338 | propertyPath: m_LocalPosition.z 339 | value: 1.65 340 | objectReference: {fileID: 0} 341 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 342 | propertyPath: m_LocalRotation.x 343 | value: -0 344 | objectReference: {fileID: 0} 345 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 346 | propertyPath: m_LocalRotation.y 347 | value: 0.12939028 348 | objectReference: {fileID: 0} 349 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 350 | propertyPath: m_LocalRotation.z 351 | value: -0 352 | objectReference: {fileID: 0} 353 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 354 | propertyPath: m_LocalRotation.w 355 | value: 0.9915937 356 | objectReference: {fileID: 0} 357 | - target: {fileID: 4348546006848248, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 358 | propertyPath: m_RootOrder 359 | value: 4 360 | objectReference: {fileID: 0} 361 | m_RemovedComponents: [] 362 | m_ParentPrefab: {fileID: 100100000, guid: 66766ad604756f74aa69fbe002219a10, type: 2} 363 | m_IsPrefabParent: 0 364 | -------------------------------------------------------------------------------- /Teleport/Scripts/FPETeleport.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Whilefun.FPEKit 6 | { 7 | 8 | // 9 | // FPETeleport 10 | // This class acts as a level doorway with an exit trigger volume and entrance. It is 11 | // similar to the FPEDoorway script, but acts strictly in a local way. It can be used 12 | // to teleport the player from one location in a scene to another location in the same 13 | // scene. 14 | // 15 | // Copyright 2018 While Fun Games 16 | // http://whilefun.com 17 | // 18 | [RequireComponent(typeof(BoxCollider))] 19 | public class FPETeleport : MonoBehaviour 20 | { 21 | 22 | [SerializeField, Tooltip("The transform that will act as the 'Destination' for the player. When the player uses this teleport, they are placed at the destination transform.")] 23 | private Transform destinationTransform; 24 | public Transform DestinationTransform { get { return destinationTransform; } } 25 | 26 | [SerializeField, Tooltip("If true, player's view will be reset to face the same way as the destination transform Z-Forward. If false, player will keep facing the same way they were when they entered the teleport.")] 27 | private bool forceLookReset = false; 28 | 29 | private BoxCollider myCollider = null; 30 | 31 | void Awake() 32 | { 33 | 34 | myCollider = gameObject.GetComponent(); 35 | 36 | if (!myCollider) 37 | { 38 | myCollider = gameObject.AddComponent(); 39 | } 40 | 41 | myCollider.isTrigger = true; 42 | myCollider.size = Vector3.one; 43 | 44 | } 45 | 46 | void OnTriggerEnter(Collider other) 47 | { 48 | 49 | if (other.CompareTag("Player") && !FPEInteractionManagerScript.Instance.PlayerSuspendedForSaveLoad) 50 | { 51 | 52 | FPEPlayer.Instance.gameObject.transform.position = destinationTransform.position; 53 | FPEPlayer.Instance.gameObject.transform.rotation = destinationTransform.rotation; 54 | 55 | if (forceLookReset) 56 | { 57 | FPEPlayer.Instance.gameObject.GetComponent().setPlayerLookToNeutralLevelLoadedPosition(); 58 | } 59 | 60 | } 61 | 62 | } 63 | 64 | #if UNITY_EDITOR 65 | 66 | void OnDrawGizmos() 67 | { 68 | 69 | Color c = Color.cyan; 70 | c.a = 0.5f; 71 | Gizmos.color = c; 72 | 73 | Matrix4x4 cubeTransform = Matrix4x4.TRS(transform.position, transform.rotation, transform.localScale); 74 | Matrix4x4 oldGizmosMatrix = Gizmos.matrix; 75 | 76 | Gizmos.matrix *= cubeTransform; 77 | Gizmos.DrawCube(Vector3.zero, Vector3.one); 78 | Gizmos.matrix = oldGizmosMatrix; 79 | 80 | Gizmos.DrawIcon(transform.position, "Whilefun/doorwayExit.png", false); 81 | 82 | if(destinationTransform != null) 83 | { 84 | 85 | c = Color.magenta; 86 | c.a = 0.5f; 87 | Gizmos.color = c; 88 | 89 | Gizmos.DrawSphere(destinationTransform.position, 0.75f); 90 | Gizmos.DrawWireSphere(destinationTransform.position, 0.75f); 91 | Gizmos.DrawIcon(destinationTransform.position, "Whilefun/doorwayEntrance.png", false); 92 | 93 | } 94 | 95 | } 96 | 97 | #endif 98 | 99 | } 100 | 101 | } -------------------------------------------------------------------------------- /Teleport/Teleport.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whilefun/FPEKitAddOns/4cf7d83621f4722afac7e25eeed0fe4b967d853f/Teleport/Teleport.gif -------------------------------------------------------------------------------- /VirtualSnapshot/Documentation/README.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1) Import First Person Explrotion Kit into new Project A 4 | 5 | 2) Import Virtual Snapshot into new Project B 6 | 7 | 3) Add "VirtualSnapshot" tag to Project A 8 | 9 | 4) Copy VirtualSnapshot folder from Project B into Assets folder of Project A 10 | 11 | 5) Update VirtualSnapshotDisposable, VirtualSnapshotDSLR, and VirtualSnapshotFilmSLR prefabs to ensure they are still tagged with VirtualSnapshot tag 12 | 13 | 6) Make the following updates to FPEInteractionManagerScipt.cs: 14 | 15 | 16 | 17 | 18 | A) Make setMouseSensitivity() public (~line 2216) 19 | 20 | B) Make restorePreviousMouseSensitivity() public 21 | 22 | C) Add new cameraActive bool and ToggleCamera() function as follows: 23 | 24 | private bool cameraActive = false; 25 | public void ToggleCamera () { 26 | cameraActive = !cameraActive; 27 | } 28 | 29 | D) For each if statement inside "#region CORE_INTERACTION_LOGIC" where "!dockingInProgress" is a condition, also add "&& !cameraActive" as another condition (4 places total, around lines 381, 659, 800, and 901) 30 | 31 | 32 | 33 | 7) Make the following updates to VirtualSnapshotScript.cs: 34 | 35 | A) Add using Whilefun.FPEKit; 36 | 37 | B) Change VirtualSnapshot camera key to Tab instead of C (around line 272), as it conflicts with Crouch key. Can also re-assign to an input from FPEInputManager and define a new dedicated Camera key defintion later if desired. 38 | 39 | C) Change camera key toggle to be GetKeyDown instead of GetKey (around line 272) 40 | 41 | D) Add the following to the bottom of the Start() function: 42 | 43 | snapshotCamera = Camera.main; 44 | 45 | E) Move the following from Awake() to Start(): 46 | 47 | Move this from around line 118: 48 | 49 | startZoom = snapshotCamera.fieldOfView; 50 | currentZoom = startZoom; 51 | targetZoom = startZoom; 52 | previousZoom = startZoom; 53 | 54 | Move this from around line 198: 55 | 56 | thePlayer = GameObject.FindGameObjectWithTag("Player"); 57 | if (!thePlayer){ 58 | Debug.LogError("VirtualSnapshotScript:: No object in scene tagged as 'Player'"); 59 | } 60 | 61 | getStartSensitivity(); 62 | 63 | 64 | F) Inside the beginning of the "Input.GetKeyDown(KeyCode.Tab)" statement and before if(cameraUp) statement, add the following: 65 | 66 | if (FPEInteractionManagerScript.Instance != null) 67 | { 68 | FPEInteractionManagerScript.Instance.ToggleCamera(); 69 | } 70 | 71 | G) Edit adjustMouseLookSensitivity() to replace 72 | 73 | thePlayer.GetComponent().setMouseSensitivity(adjustedSensitivity.x, adjustedSensitivity.y); 74 | 75 | with 76 | 77 | FPEInteractionManagerScript.Instance.setMouseSensitivity(adjustedSensitivity); 78 | 79 | H) Edit resetMouseLookSensitivity() to replace 80 | 81 | //thePlayer.GetComponent().setMouseSensitivity(startSensitivity.x, startSensitivity.y); 82 | 83 | with 84 | 85 | FPEInteractionManagerScript.Instance.restorePreviousMouseSensitivity(false); 86 | 87 | I) Edit getStartSensitivity() so that it only contains: 88 | 89 | startSensitivity = FPEInputManager.Instance.LookSensitivity; 90 | 91 | J) Inside Update(), the last else block can be removed entirely. 92 | 93 | K) In each of the VirtualSnapshotDisposable, VirtualSnapshotDSLR, and VirtualSnapshotFilmSLR prefaba, change "SnapshotUICanvas" and "CameraTransitionCanvas" from "Screen Space - Camera" to "Screen Space - Overlay" 94 | 95 | 96 | You can add the included IntegrationTest.unity scene to your project and run it. Press tab to open the camera, take a picture of the soup can, then go pickup and examine the soup can. 97 | 98 | 99 | IMPORTANT NOTE: 100 | 101 | There are probably going to be some edge cases with interactions and UI priorities that are not addressed here. For example, in some cases you can take a photo while holding an object. That might not be something you want to be allowed. Same goes with lots of other things like docks, journals, etc. These should all be addressable with relative ease by just setting up rules for the camera. For example, you might want to change the new ToggleCamera() function to be a request rather than a passive toggle. For example, maybe it rejects the request to take out the camera if you're sitting down, holding something, looking at a button, etc., etc. and prompts the player with a "You cant do that right now" or similar. 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /VirtualSnapshot/Requirements.txt: -------------------------------------------------------------------------------- 1 | Unity 2018.3.1f1 2 | First Person Exploration Kit v2.2.3 3 | Virtual Snapshot v1.2 -------------------------------------------------------------------------------- /VirtualSnapshot/Scenes/IntegrationTest.unity: -------------------------------------------------------------------------------- 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: 7 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.5514706, g: 0.5514706, b: 0.5514706, 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_SkyboxMaterial: {fileID: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 1 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentTypeID: 0 83 | agentRadius: 0.5 84 | agentHeight: 2 85 | agentSlope: 45 86 | agentClimb: 0.4 87 | ledgeDropHeight: 0 88 | maxJumpAcrossDistance: 0 89 | minRegionArea: 2 90 | manualCellSize: 0 91 | cellSize: 0.16666667 92 | accuratePlacement: 0 93 | m_NavMeshData: {fileID: 0} 94 | --- !u!1001 &157265497 95 | Prefab: 96 | m_ObjectHideFlags: 0 97 | serializedVersion: 2 98 | m_Modification: 99 | m_TransformParent: {fileID: 0} 100 | m_Modifications: 101 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 102 | propertyPath: m_LocalPosition.x 103 | value: 0 104 | objectReference: {fileID: 0} 105 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 106 | propertyPath: m_LocalPosition.y 107 | value: 1.278 108 | objectReference: {fileID: 0} 109 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 110 | propertyPath: m_LocalPosition.z 111 | value: 0.507 112 | objectReference: {fileID: 0} 113 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 114 | propertyPath: m_LocalRotation.x 115 | value: 0 116 | objectReference: {fileID: 0} 117 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 118 | propertyPath: m_LocalRotation.y 119 | value: 0 120 | objectReference: {fileID: 0} 121 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 122 | propertyPath: m_LocalRotation.z 123 | value: 0 124 | objectReference: {fileID: 0} 125 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 126 | propertyPath: m_LocalRotation.w 127 | value: 1 128 | objectReference: {fileID: 0} 129 | - target: {fileID: 495236, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 130 | propertyPath: m_RootOrder 131 | value: 6 132 | objectReference: {fileID: 0} 133 | m_RemovedComponents: [] 134 | m_ParentPrefab: {fileID: 100100000, guid: 08cba808171a1a349a045b77caf5086b, type: 2} 135 | m_IsPrefabParent: 0 136 | --- !u!1001 &321099526 137 | Prefab: 138 | m_ObjectHideFlags: 0 139 | serializedVersion: 2 140 | m_Modification: 141 | m_TransformParent: {fileID: 0} 142 | m_Modifications: 143 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 144 | propertyPath: m_LocalPosition.x 145 | value: 0 146 | objectReference: {fileID: 0} 147 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 148 | propertyPath: m_LocalPosition.y 149 | value: 0 150 | objectReference: {fileID: 0} 151 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 152 | propertyPath: m_LocalPosition.z 153 | value: 0 154 | objectReference: {fileID: 0} 155 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 156 | propertyPath: m_LocalRotation.x 157 | value: 0 158 | objectReference: {fileID: 0} 159 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 160 | propertyPath: m_LocalRotation.y 161 | value: 0 162 | objectReference: {fileID: 0} 163 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 164 | propertyPath: m_LocalRotation.z 165 | value: 0 166 | objectReference: {fileID: 0} 167 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 168 | propertyPath: m_LocalRotation.w 169 | value: 1 170 | objectReference: {fileID: 0} 171 | - target: {fileID: 4436134608711204, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 172 | propertyPath: m_RootOrder 173 | value: 3 174 | objectReference: {fileID: 0} 175 | m_RemovedComponents: [] 176 | m_ParentPrefab: {fileID: 100100000, guid: 61ee32032a51f264ab192daff55116f3, type: 2} 177 | m_IsPrefabParent: 0 178 | --- !u!1001 &759304234 179 | Prefab: 180 | m_ObjectHideFlags: 0 181 | serializedVersion: 2 182 | m_Modification: 183 | m_TransformParent: {fileID: 0} 184 | m_Modifications: 185 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 186 | propertyPath: m_LocalPosition.x 187 | value: 1.2902145 188 | objectReference: {fileID: 0} 189 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 190 | propertyPath: m_LocalPosition.y 191 | value: 0.906 192 | objectReference: {fileID: 0} 193 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 194 | propertyPath: m_LocalPosition.z 195 | value: 4.1463013 196 | objectReference: {fileID: 0} 197 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 198 | propertyPath: m_LocalRotation.x 199 | value: 0 200 | objectReference: {fileID: 0} 201 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 202 | propertyPath: m_LocalRotation.y 203 | value: 0.9942066 204 | objectReference: {fileID: 0} 205 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 206 | propertyPath: m_LocalRotation.z 207 | value: 0 208 | objectReference: {fileID: 0} 209 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 210 | propertyPath: m_LocalRotation.w 211 | value: -0.107486255 212 | objectReference: {fileID: 0} 213 | - target: {fileID: 442332, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 214 | propertyPath: m_RootOrder 215 | value: 4 216 | objectReference: {fileID: 0} 217 | m_RemovedComponents: [] 218 | m_ParentPrefab: {fileID: 100100000, guid: 487a0981fc18f6549afdd2bb2274edc3, type: 2} 219 | m_IsPrefabParent: 0 220 | --- !u!1001 &773365465 221 | Prefab: 222 | m_ObjectHideFlags: 0 223 | serializedVersion: 2 224 | m_Modification: 225 | m_TransformParent: {fileID: 0} 226 | m_Modifications: 227 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 228 | propertyPath: m_LocalPosition.x 229 | value: 1.1751349 230 | objectReference: {fileID: 0} 231 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 232 | propertyPath: m_LocalPosition.y 233 | value: 0.14689243 234 | objectReference: {fileID: 0} 235 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 236 | propertyPath: m_LocalPosition.z 237 | value: 0 238 | objectReference: {fileID: 0} 239 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 240 | propertyPath: m_LocalRotation.x 241 | value: 0 242 | objectReference: {fileID: 0} 243 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 244 | propertyPath: m_LocalRotation.y 245 | value: 0 246 | objectReference: {fileID: 0} 247 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 248 | propertyPath: m_LocalRotation.z 249 | value: 0 250 | objectReference: {fileID: 0} 251 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 252 | propertyPath: m_LocalRotation.w 253 | value: 1 254 | objectReference: {fileID: 0} 255 | - target: {fileID: 400422, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 256 | propertyPath: m_RootOrder 257 | value: 5 258 | objectReference: {fileID: 0} 259 | m_RemovedComponents: [] 260 | m_ParentPrefab: {fileID: 100100000, guid: 954b920f7d8148546baa882ce50a9dcc, type: 2} 261 | m_IsPrefabParent: 0 262 | --- !u!1 &1200387459 263 | GameObject: 264 | m_ObjectHideFlags: 0 265 | m_PrefabParentObject: {fileID: 0} 266 | m_PrefabInternal: {fileID: 0} 267 | serializedVersion: 5 268 | m_Component: 269 | - component: {fileID: 1200387463} 270 | - component: {fileID: 1200387462} 271 | - component: {fileID: 1200387461} 272 | - component: {fileID: 1200387460} 273 | m_Layer: 0 274 | m_Name: Plane 275 | m_TagString: Untagged 276 | m_Icon: {fileID: 0} 277 | m_NavMeshLayer: 0 278 | m_StaticEditorFlags: 0 279 | m_IsActive: 1 280 | --- !u!23 &1200387460 281 | MeshRenderer: 282 | m_ObjectHideFlags: 0 283 | m_PrefabParentObject: {fileID: 0} 284 | m_PrefabInternal: {fileID: 0} 285 | m_GameObject: {fileID: 1200387459} 286 | m_Enabled: 1 287 | m_CastShadows: 1 288 | m_ReceiveShadows: 1 289 | m_MotionVectors: 1 290 | m_LightProbeUsage: 1 291 | m_ReflectionProbeUsage: 1 292 | m_Materials: 293 | - {fileID: 2100000, guid: f2521483140fd684cb25837dd618e4d5, type: 2} 294 | m_StaticBatchInfo: 295 | firstSubMesh: 0 296 | subMeshCount: 0 297 | m_StaticBatchRoot: {fileID: 0} 298 | m_ProbeAnchor: {fileID: 0} 299 | m_LightProbeVolumeOverride: {fileID: 0} 300 | m_ScaleInLightmap: 1 301 | m_PreserveUVs: 1 302 | m_IgnoreNormalsForChartDetection: 0 303 | m_ImportantGI: 0 304 | m_SelectedEditorRenderState: 3 305 | m_MinimumChartSize: 4 306 | m_AutoUVMaxDistance: 0.5 307 | m_AutoUVMaxAngle: 89 308 | m_LightmapParameters: {fileID: 0} 309 | m_SortingLayerID: 0 310 | m_SortingOrder: 0 311 | --- !u!64 &1200387461 312 | MeshCollider: 313 | m_ObjectHideFlags: 0 314 | m_PrefabParentObject: {fileID: 0} 315 | m_PrefabInternal: {fileID: 0} 316 | m_GameObject: {fileID: 1200387459} 317 | m_Material: {fileID: 0} 318 | m_IsTrigger: 0 319 | m_Enabled: 1 320 | serializedVersion: 2 321 | m_Convex: 0 322 | m_InflateMesh: 0 323 | m_SkinWidth: 0.01 324 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 325 | --- !u!33 &1200387462 326 | MeshFilter: 327 | m_ObjectHideFlags: 0 328 | m_PrefabParentObject: {fileID: 0} 329 | m_PrefabInternal: {fileID: 0} 330 | m_GameObject: {fileID: 1200387459} 331 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 332 | --- !u!4 &1200387463 333 | Transform: 334 | m_ObjectHideFlags: 0 335 | m_PrefabParentObject: {fileID: 0} 336 | m_PrefabInternal: {fileID: 0} 337 | m_GameObject: {fileID: 1200387459} 338 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 339 | m_LocalPosition: {x: 0, y: 0, z: 0} 340 | m_LocalScale: {x: 5, y: 5, z: 5} 341 | m_Children: [] 342 | m_Father: {fileID: 0} 343 | m_RootOrder: 1 344 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 345 | --- !u!1 &1442965743 346 | GameObject: 347 | m_ObjectHideFlags: 0 348 | m_PrefabParentObject: {fileID: 0} 349 | m_PrefabInternal: {fileID: 0} 350 | serializedVersion: 5 351 | m_Component: 352 | - component: {fileID: 1442965747} 353 | - component: {fileID: 1442965746} 354 | - component: {fileID: 1442965745} 355 | - component: {fileID: 1442965744} 356 | m_Layer: 0 357 | m_Name: Table 358 | m_TagString: Untagged 359 | m_Icon: {fileID: 0} 360 | m_NavMeshLayer: 0 361 | m_StaticEditorFlags: 0 362 | m_IsActive: 1 363 | --- !u!23 &1442965744 364 | MeshRenderer: 365 | m_ObjectHideFlags: 0 366 | m_PrefabParentObject: {fileID: 0} 367 | m_PrefabInternal: {fileID: 0} 368 | m_GameObject: {fileID: 1442965743} 369 | m_Enabled: 1 370 | m_CastShadows: 1 371 | m_ReceiveShadows: 1 372 | m_MotionVectors: 1 373 | m_LightProbeUsage: 1 374 | m_ReflectionProbeUsage: 1 375 | m_Materials: 376 | - {fileID: 2100000, guid: b4e78b3e0b301374e8099716d666d76f, type: 2} 377 | m_StaticBatchInfo: 378 | firstSubMesh: 0 379 | subMeshCount: 0 380 | m_StaticBatchRoot: {fileID: 0} 381 | m_ProbeAnchor: {fileID: 0} 382 | m_LightProbeVolumeOverride: {fileID: 0} 383 | m_ScaleInLightmap: 1 384 | m_PreserveUVs: 1 385 | m_IgnoreNormalsForChartDetection: 0 386 | m_ImportantGI: 0 387 | m_SelectedEditorRenderState: 3 388 | m_MinimumChartSize: 4 389 | m_AutoUVMaxDistance: 0.5 390 | m_AutoUVMaxAngle: 89 391 | m_LightmapParameters: {fileID: 0} 392 | m_SortingLayerID: 0 393 | m_SortingOrder: 0 394 | --- !u!65 &1442965745 395 | BoxCollider: 396 | m_ObjectHideFlags: 0 397 | m_PrefabParentObject: {fileID: 0} 398 | m_PrefabInternal: {fileID: 0} 399 | m_GameObject: {fileID: 1442965743} 400 | m_Material: {fileID: 0} 401 | m_IsTrigger: 0 402 | m_Enabled: 1 403 | serializedVersion: 2 404 | m_Size: {x: 1, y: 1, z: 1} 405 | m_Center: {x: 0, y: 0, z: 0} 406 | --- !u!33 &1442965746 407 | MeshFilter: 408 | m_ObjectHideFlags: 0 409 | m_PrefabParentObject: {fileID: 0} 410 | m_PrefabInternal: {fileID: 0} 411 | m_GameObject: {fileID: 1442965743} 412 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 413 | --- !u!4 &1442965747 414 | Transform: 415 | m_ObjectHideFlags: 0 416 | m_PrefabParentObject: {fileID: 0} 417 | m_PrefabInternal: {fileID: 0} 418 | m_GameObject: {fileID: 1442965743} 419 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 420 | m_LocalPosition: {x: 0.46, y: 0.244, z: 4.26} 421 | m_LocalScale: {x: 4.0271378, y: 1, z: 1} 422 | m_Children: [] 423 | m_Father: {fileID: 0} 424 | m_RootOrder: 2 425 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 426 | --- !u!1 &1495803521 427 | GameObject: 428 | m_ObjectHideFlags: 0 429 | m_PrefabParentObject: {fileID: 0} 430 | m_PrefabInternal: {fileID: 0} 431 | serializedVersion: 5 432 | m_Component: 433 | - component: {fileID: 1495803523} 434 | - component: {fileID: 1495803522} 435 | m_Layer: 0 436 | m_Name: Directional Light 437 | m_TagString: Untagged 438 | m_Icon: {fileID: 0} 439 | m_NavMeshLayer: 0 440 | m_StaticEditorFlags: 0 441 | m_IsActive: 1 442 | --- !u!108 &1495803522 443 | Light: 444 | m_ObjectHideFlags: 0 445 | m_PrefabParentObject: {fileID: 0} 446 | m_PrefabInternal: {fileID: 0} 447 | m_GameObject: {fileID: 1495803521} 448 | m_Enabled: 1 449 | serializedVersion: 7 450 | m_Type: 1 451 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 452 | m_Intensity: 1 453 | m_Range: 10 454 | m_SpotAngle: 30 455 | m_CookieSize: 10 456 | m_Shadows: 457 | m_Type: 2 458 | m_Resolution: -1 459 | m_CustomResolution: -1 460 | m_Strength: 1 461 | m_Bias: 0.05 462 | m_NormalBias: 0.4 463 | m_NearPlane: 0.2 464 | m_Cookie: {fileID: 0} 465 | m_DrawHalo: 0 466 | m_Flare: {fileID: 0} 467 | m_RenderMode: 0 468 | m_CullingMask: 469 | serializedVersion: 2 470 | m_Bits: 4294967295 471 | m_Lightmapping: 4 472 | m_AreaSize: {x: 1, y: 1} 473 | m_BounceIntensity: 1 474 | m_ShadowRadius: 0 475 | m_ShadowAngle: 0 476 | --- !u!4 &1495803523 477 | Transform: 478 | m_ObjectHideFlags: 0 479 | m_PrefabParentObject: {fileID: 0} 480 | m_PrefabInternal: {fileID: 0} 481 | m_GameObject: {fileID: 1495803521} 482 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 483 | m_LocalPosition: {x: 0, y: 10, z: 0} 484 | m_LocalScale: {x: 1, y: 1, z: 1} 485 | m_Children: [] 486 | m_Father: {fileID: 0} 487 | m_RootOrder: 0 488 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 489 | -------------------------------------------------------------------------------- /VirtualSnapshot/Scenes/IntegrationTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d824352872997f143b3b2245ba22e273 3 | timeCreated: 1528824814 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | --------------------------------------------------------------------------------