- Emil Persson @Humus
- Matt Pettineo @mynameismjp
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 UnityEngine; | |
| public interface IPooledObject { | |
| void Dispose(); // { ObjectPool<T>.Recycle(this); } | |
| void Reset(); | |
| } | |
| public static class ObjectPool<T> where T: class, IPooledObject, new() { |
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 UnityEngine.Profiling; | |
| using UnityEngine.Rendering; | |
| namespace UnityEngine.Experimental.Rendering | |
| { | |
| public class CustomProfiler : MonoBehaviour { | |
| public bool enable = true; |