Data binding object implementation for unity3D
This file contains 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; | |
namespace Hogehoge.Fugafuga | |
{ | |
public class DefaultArguments : MonoBehaviour | |
{ | |
int hoge = 100; | |
public void SetHoge (int value = 0) |
This file contains 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.Text; | |
namespace System | |
{ | |
/// <summary> | |
/// Tuple. | |
/// </summary> | |
public static class Tuple |
This file contains 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.Threading; | |
public sealed class ReadWriteLock | |
{ | |
#region Properties | |
public string Name { get; private set; } | |
#endregion |
This file contains 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; | |
/// <summary> | |
/// Ease functions. | |
/// </summary>/ | |
public static class Ease | |
{ | |
#region basic easing | |
public static float Linear(float variation, float elapsed, float delay, float offset) | |
{ |
This file contains 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; | |
/// <summary> | |
/// The base class of the Presenter class which does not operate View. | |
/// </summary> | |
public abstract class Presenter | |
{ | |
protected Presenter() | |
{ | |
} |
This file contains 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 NUnit.Framework; | |
using System.Collections.Generic; | |
[TestFixture] | |
public class DictionaryWithNullValueTest | |
{ | |
[Test] | |
public void DictionaryCanGetNullableInteger() | |
{ | |
Dictionary<string, object> dict = (Dictionary<string, object>) MiniJSON.Json.Deserialize("{ \"hoge\": null }"); |
inner classの雑な例。 元となるpartial classにはフィールドないしプロパティのみ定義 inner classで生成や操作等行うとか
単純なJIT領域の例
肝となるのはFoo<T>#Log()内の、t.ToString();
なところ
例えばこれをtにしたとしても、UnityEngine::Debug::Log()の実装が
using System;
public static void Log(object message)
{
Debug.Internal_Log(0, (message == null) ? "Null" : message.ToString(), null);
}
This file contains 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; | |
namespace Hoge | |
{ | |
public class ShaderInspectorExample : MonoBehaviour | |
{ | |
public Shader publicShader; | |
[SerializeField] | |
Shader privateShader; | |
} |