These are collected and created scripts for use in the Unity 5.x game engine.
- Create an animation state transition that is connected to a Animator Trigger. Mine was named 'box'
- Drag this script onto your object with an Animation Controller and create a collider trigger on that same object.
- Play! The state will change as the trigger is affected by your collider box.
- Drag this script onto an object which has a Movie Texture applied.
- Create a UI Canvas and Text object.
- Set Canvas render mode to "world space", resize and place where you would like it to pop up.
- Type your desired text in the Text object to see how it will look, and place it.
- Drag PopupText.cs onto your main object which has a collider trigger, make the Canvas>Text a child of that GameObject.
- Type what you would like your text to say in the script "string" box and set the fade amount to your desired speed. 2 works well for me.
- If you add more popup events, make a copy of the script and change your new Text UI GameObject to a unique name, change that name in the new script on the line: GameObject.Find ("your text object name")
- Create a collider box trigger and drag this script onto it.
- Change the script to use the unique name of the GameObject you would like to disappear/reappear.
- If using a default object like 'Box', you will need to put the scale that you would like it to be when it 'appears'. Otherwise, you can make any GameObject/mesh appear with (1,1,1).
- Drag an audio file onto your GameObject.
- Create a collider for your player and check "is trigger".
- Drag the soundtrigger.cs file onto the same GameObject.
- Follow steps 1 and 2 above for regular soundtrigger.cs interaction.
- Add SoundTrigger_Button.cs to the GameObject and edit the .cs file if you would like a specific button. The default button is 'e'.
- Drag the TeleportPlayer.cs file onto an object that will teleport you, and make sure that “Instant Teleport” is checked in the properties.
- Add a collider (any shape) to that object and click “is trigger”. Resize or move the green collider shape to where you would like the teleport to trigger.
- Drag the TeleportPlayer.cs file onto the object that you will be teleported to.