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.Net; | |
| public static class GoogleSheetsDownloader | |
| { | |
| /// <summary> | |
| /// | |
| /// </summary> | |
| /// <param name="url">Google Sheets link (set to view 'Anyone with the link'), without stuff after slash: /edit.. or /view.. | |
| /// For example https://docs.google.com/spreadsheets/d/12345U57wZNjsOtOB3ULxXofn45axbHiA-qX37kF2sOM </param> | |
| /// <param name="format">Data format, for example "csv" or "tsv"</param> | |
| /// <returns></returns> |
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 Unity.Mathematics; | |
| using static Unity.Mathematics.math; | |
| using static Unity.Mathematics.quaternion; | |
| namespace Orbiter.Math | |
| { | |
| public static class Operations | |
| { | |
| public static float3 transform_l2w(float4x4 m, float3 v) | |
| { |
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; | |
| public class MeshBlit : MonoBehaviour | |
| { | |
| public RenderTexture rt; | |
| public Mesh mesh; | |
| public Material material; | |
| public Vector3 meshPosition = new Vector3(0.5f, 0.5f, -1); |
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
| struct CubeWithColor | |
| { | |
| public float3 position; | |
| public Color32 color; | |
| } | |
| List<CubeWithColor> ParseMVPointsFile(string filePath) | |
| { | |
| const string HEADER_LINE = "end_header"; |
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.Generic; | |
| using u = UnityEngine; | |
| using Unity.Mathematics; | |
| using static Unity.Mathematics.math; | |
| using Unity.Entities; | |
| using Unity.Transforms; | |
| using Unity.Rendering; | |
| using Unity.Physics; |
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
| /// Singleton example | |
| using UnityEngine; | |
| public class SomeSingletonClass : MonoBehaviour | |
| { | |
| public static SomeSingletonClass instance; | |
| void Awake() { instance = this; } | |
| public float someValue; |
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
| Shader "IFL/DynamicWater" { | |
| Properties { | |
| _ReflectionTex ("Internal reflection", 2D) = "white" {} | |
| _MainTex ("Fallback texture", 2D) = "black" {} | |
| _ShoreTex ("Shore & Foam texture ", 2D) = "black" {} | |
| _BumpMap ("Normals ", 2D) = "bump" {} | |
| _DistortParams ("Distortions (Bump waves, Reflection, Fresnel power, Fresnel bias)", Vector) = (1.0 ,1.0, 2.0, 1.15) | |
| _InvFadeParemeter ("Auto blend parameter (Edge, Shore, Distance scale)", Vector) = (0.15 ,0.15, 0.5, 1.0) |
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; | |
| using Unity.Entities; | |
| using Unity.Mathematics; | |
| using Unity.Collections; | |
| using Unity.Transforms; | |
| using Unity.Rendering; |
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
| -- variables | |
| suspheight = 10 -- height of suspension | |
| springrate = 10 -- spring stiffness | |
| damprate = 1 -- damping amount | |
| bouncemult = 0 -- bounce when we bottom out, keep between 0-1 | |
| velo = 0 -- verticla velocity | |
| y = 100 -- distance from bottom of vehicle to ground | |
| deltatime = 1/30 -- depending on framerate | |
| -- ground is assumed to be at 0 |
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
| /// For this to work you need to copy these 2 files: | |
| /// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Drawing.dll | |
| /// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Windows.Forms.dll | |
| /// ..to a "Plugins" folder within your project | |
| /// | |
| /// For this example to work, you need to have a (UI) Canvas object in your scene | |
| /// Put this script on any object | |
| /// | |
| /// Tested on windows, not sure if it works on any other platform | |
| /// |