This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class MeshDestroy : MonoBehaviour | |
| { | |
| private bool edgeSet = false; | |
| private Vector3 edgeVertex = Vector3.zero; | |
| private Vector2 edgeUV = Vector2.zero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This was made by aaro4130 on the Unity forums. Thanks boss! | |
| // It's been optimized and slimmed down for the purpose of loading Quake 3 TGA textures from memory streams. | |
| using System; | |
| using System.IO; | |
| using UnityEngine; | |
| public static class TGALoader | |
| { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move. | |
| public class SmoothGameCameraMovement : MonoBehaviour | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this is faster than unity *.bounds.IntersectRay(ray) | |
| // original source https://gamedev.stackexchange.com/a/103714/73429 | |
| float RayBoxIntersect(Vector3 rpos, Vector3 rdir, Vector3 vmin, Vector3 vmax) | |
| { | |
| float t1 = (vmin.x - rpos.x) / rdir.x; | |
| float t2 = (vmax.x - rpos.x) / rdir.x; | |
| float t3 = (vmin.y - rpos.y) / rdir.y; | |
| float t4 = (vmax.y - rpos.y) / rdir.y; | |
| float t5 = (vmin.z - rpos.z) / rdir.z; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using UnityEditor; | |
| [CustomEditor (typeof(TriggerContainer))] | |
| public class TriggerContainerEditor : Editor | |
| { | |
| private SerializedObject obj; |