Instantly share code, notes, and snippets.

View UpdateTransitions.cs
using UnityEditor;
using UnityEditor.Animations;
public class UpdateTransitions
{
[MenuItem("Assets/UpdateTransitionTime")]
static void Do()
{
foreach( var obj in Selection.objects)
{
View MyInputSampleTest.cs
using UnityEngine;
using UnityEngine.Experimental.Input;
public class MyInputSampleTest : MonoBehaviour, ISampleActions
{
[SerializeField] MyInputSample input;
private void Awake()
{
input.Sample.SetCallbacks(this);
View InputTest2.cs
using UnityEngine;
using UnityEngine.Experimental.Input;
public class InputTest2 : MonoBehaviour
{
public InputAction mouseInput; // マウスの入力
public InputAction fireInput; // ボタンの入力
private void OnEnable()
{
View InputTest.cs
using UnityEngine;
using UnityEngine.Experimental.Input;
public class InputTest : MonoBehaviour
{
private void Update()
{
Debug.LogFormat("Mouse Position : {0}", Mouse.current.position.ReadValue());
Debug.LogFormat("Press Space Key: {0}" , Keyboard.current.spaceKey.isPressed);
}
View TestSystem10.cs
using UnityEngine;
using Unity.Entities;
using Unity.Jobs;
using Unity.Collections;
public class TestSystem10 : JobComponentSystem
{
protected override JobHandle OnUpdate(JobHandle inputDeps)
{
return new Process().ScheduleSingle(this, inputDeps);
View CSMain.compute
#pragma kernel CSMain
RWStructuredBuffer<float4> Result;
[numthreads(4, 1, 1)]
void CSMain (uint3 groupID : SV_GroupID,
uint3 id : SV_DispatchThreadID)
{
float4 pos = Result[id.x];
pos.y += 1;
View DownloadAndDisplay.cs
using System;
using System.Collections;
using System.IO;
using Unity.Networking;
using UnityEngine;
using UnityEngine.UI;
public class DownloadAndDisplay : MonoBehaviour
{
[SerializeField]
View Rebind.cs
using System;
using UnityEngine;
using UnityEngine.U2D;
public class Rebind : MonoBehaviour
{
Action<SpriteAtlas> atlasAction;
AssetBundle assetbundle;
const string assetBundleName = "atlas";
View TextMarker.cs
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
// テキスト情報を送信するマーカー
[System.Serializable, DisplayName("テキストのマーカー")]
public class TextMarker : Marker, INotification
{
public string message;
View BuildTest.cs
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEditor.Build.Pipeline.Interfaces;
using UnityEditor.Build.Pipeline;
using UnityEditor.Build.Pipeline.Injector;
using UnityEngine.Assertions;
public static class BuildTest