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 System.Collections.Generic; | |
| using Extensions; | |
| namespace Occlusion | |
| { | |
| public class Area : 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
| public static class GrabScreenSwatch { | |
| public static Texture GrabScreenSwatch(Rect rect) { | |
| int width = (int)rect.width; | |
| int height = (int)rect.height; | |
| int x = (int)rect.x; | |
| int y = (int)rect.y; | |
| Vector2 position = new Vector2(x, y); | |
| Color[] pixels = UnityEditorInternal.InternalEditorUtility.ReadScreenPixel(position, width, height); |
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 (var client = new HttpClient()) | |
| { | |
| var values = new List<KeyValuePair<string, string>>(); | |
| values.Add(new KeyValuePair<string, int>("n", "42")); | |
| values.Add(new KeyValuePair<string, string>("s", "string value")); | |
| var content = new FormUrlEncodedContent(values); | |
| var response = await client.PostAsync("http://www.domain.org/receiver.aspx", content); |
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 UnityEditor; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| [CustomEditor (typeof(MonoBehaviour),true)] | |
| [CanEditMultipleObjects] | |
| public class MonoBehaviourInspector : Editor | |
| { |
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
| // Adds a menu item for easy creation of your ScriptableObject types | |
| // Usage: Right click in project view -> Create -> ScriptableObject... -> Select your type | |
| // It will land in the root of your assets folder with the same name as your class | |
| // Freya Holmér - [email protected] | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Reflection; | |
| using System.Linq; | |
| using System.IO; |
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
| { | |
| "version":2.0, | |
| "display_hints":[ | |
| { | |
| "key":"GPCAMERA_GROUP_VIDEO", | |
| "display_name":"Video Settings", | |
| "settings":[ | |
| { | |
| "setting_id":5, | |
| "widget_type":"select", |
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 (c) 2012, Romain Dura [email protected] | |
| ** | |
| ** Permission to use, copy, modify, and/or distribute this software for any | |
| ** purpose with or without fee is hereby granted, provided that the above | |
| ** copyright notice and this permission notice appear in all copies. | |
| ** | |
| ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| ** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| ** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
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
| class PriorityQueue | |
| { | |
| public List<int> list; | |
| public int Count { get { return list.Count; } } | |
| public PriorityQueue() | |
| { | |
| list = new List<int>(); | |
| } |
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
| public class MyObject | |
| { | |
| public int GetSomething() | |
| { | |
| return 10; | |
| } | |
| } | |
| [Test] | |
| public void MetatableExtensibleObjectSample() |
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 System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using MoonSharp.Interpreter; | |
| using MoonSharp.Interpreter.Debugging; | |
| namespace Tutorials.Chapters | |
| { |