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.Generic; | |
using UnityEngine; | |
namespace Lumic.Structure.Procedural | |
{ | |
public class MeshPool : ObjectPool<Mesh> | |
{ | |
protected override Mesh CreateNew() | |
{ |
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
// Copyright 2017-2021 StagPoint Software | |
namespace StagPoint.Collections | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; |
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 System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Reflection; | |
using System.Text; | |
using UnityEditor.AddressableAssets; | |
using UnityEditor.AddressableAssets.Settings; |
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
// modified for usage in Unity by grapefrukt, (removed support for polygons with holes as I do not need it) | |
// based C# port of Polylabel found here: https://github.com/mapbox/polylabel/issues/26#issue-211932869 | |
// which in turn, is based on Polylabel from https://github.com/mapbox/polylabel | |
// as the name implies this is useful for placing labels on a polygon | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Utilities { |
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
using UnityEngine; | |
// This behaviour disables 're-centering' on the Oculus Quest, | |
// instead forcing the camera origin to remain centered and | |
// facing the same direction within the Guardian boundaries, | |
// even between app restarts. | |
public class RecenterResetter : MonoBehaviour | |
{ | |
public OVRCameraRig CameraRig = null; |
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
// A simple Unity C# script for orbital movement around a target gameobject | |
// Author: Ashkan Ashtiani | |
// Gist on Github: https://gist.github.com/3dln/c16d000b174f7ccf6df9a1cb0cef7f80 | |
using System; | |
using UnityEngine; | |
namespace TDLN.CameraControllers | |
{ | |
public class CameraOrbit : 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
/******************************************************************************* | |
* Don't Be a Jerk: The Open Source Software License. | |
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
******************************************************************************* | |
* _I_ am the software author - JohannesMP on Github. | |
* _You_ are the user of this software. You might be a _we_, and that's OK! | |
* | |
* This is free, open source software. I will never charge you to use, | |
* license, or obtain this software. Doing so would make me a jerk. | |
* |
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.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public class NativeMeshTest : MonoBehaviour | |
{ | |
private NativeArray<float3> vertexBuffer; | |
private Vector3[] vertexArray; |
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; | |
using UnityEngine.Profiling; | |
public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component | |
{ | |
protected KdNode _root; | |
protected KdNode _last; |
NewerOlder