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.Generic; | |
public class EventReceiverSample : MonoBehaviour | |
{ | |
public enum AnimType { | |
TYPE_1, TYPE_2, TYPE_3 | |
} | |
/// <summary>【実行可能】引数の無い関数</summary> |
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 info.shibuya24 | |
{ | |
internal class ReflectionSample : ParentReflectionSample | |
{ | |
public static int StaticPublicField = 1; | |
private static int StaticPrivateField = 2; | |
internal static int StaticInternalField = 3; | |
protected static int StaticProtectedField = 4; |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Profiling; | |
public enum TransformAccessType | |
{ | |
transformAccess, | |
GetComponentAccess, | |
CachedTransform, |
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 Cysharp.Threading.Tasks; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class SampleQRReader : MonoBehaviour | |
{ | |
private string _result = ""; | |
private WebCamTexture _webCam; | |
void Awake() |
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 ZXing; | |
using ZXing.QrCode; | |
/// <summary> | |
/// QRコードの作成と読み込みヘルパークラス | |
/// </summary> | |
public static class QRCodeHelper | |
{ | |
/// <summary> |
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 UnityEditor; | |
using System.IO; | |
/// <summary> | |
/// QRコード作成EditorWindow | |
/// </summary> | |
public class CreateQRCodeWindow : EditorWindow | |
{ | |
private enum QRImageSize |
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
// OSC送信インスタンス | |
OSCSender m_sender; | |
public Slider slider; | |
void Start () | |
{ | |
m_sender = new OSCSender (); | |
// 送信クライアント名のセット、IPアドレス、ポート番号は適宜調整 | |
// このIPアドレスとポート番号は受信側のIPアドレスとポート番号です | |
m_sender.Init ("TestClient", 8890, IPAddress.Parse ("192.168.3.11")); |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PropertyToIdPerformance : MonoBehaviour | |
{ | |
public Material mat; | |
public bool toggle; | |
public int cnt = 5000; | |
int propId = 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
// C#からC++に構造体を送るサンプル(C#側処理) | |
using System; | |
using System.Runtime.InteropServices; | |
public static class SendStructCsToCpp | |
{ | |
[DllImport("TestDll.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern void SendStruct(ref StructData output, IntPtr input); | |
public struct StructData |
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
// C#からC++に文字列を送信するC#側のコード | |
using System.Runtime.InteropServices; | |
using UnityEngine; | |
public class InvokeCpp : MonoBehaviour | |
{ | |
[DllImport("TestDll.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern void ReceiveString(string hoge); | |
void Awake() |
NewerOlder