Skip to content

Instantly share code, notes, and snippets.

@tsubaki
tsubaki / HidwPlayButton.cs
Created February 14, 2022 06:51
UnityEditorのToolBarのVisualElementにアクセスして、PlayButtonを消したり表示したりするコード
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using System;
using System.Reflection;
using UnityEngine.UIElements;
public static class HidwPlayButton
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.LowLevel;
using System;
public class IDManager
{
Queue<int> restoreID;
int[] ID2Data;
@tsubaki
tsubaki / BallTag.cs
Created March 29, 2020 13:09
UnityPhysics 0.3.1と Entities 0.8.0 の組み合わせ
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Physics;
using Unity.Physics.Systems;
[GenerateAuthoringComponent]
public struct BallTag : IComponentData{}
[AlwaysUpdateSystem]
@tsubaki
tsubaki / BallTag.cs
Last active March 29, 2020 16:33
UnityPhysics 0.3.1と Entities 0.8.0 の組み合わせ
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Physics;
using Unity.Physics.Systems;
using static Unity.Entities.ComponentType;
namespace BallSystems
{
// ボール
@tsubaki
tsubaki / BallTag.cs
Created March 29, 2020 13:09
UnityPhysics 0.3.1と Entities 0.8.0 の組み合わせ
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Physics;
using Unity.Physics.Systems;
[GenerateAuthoringComponent]
public struct BallTag : IComponentData{}
[AlwaysUpdateSystem]
@tsubaki
tsubaki / MySystem.cs
Last active March 21, 2020 17:42
新しいEntitiesを使用するためのコード
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using Unity.Transforms;
public class MySystem : SystemBase
{
protected override void OnUpdate()
{
var time = UnityEngine.Time.timeSinceLevelLoad;
using System.Collections;
using UnityEngine;
using UnityEngine.Events;
#if UNITY_EDITOR
using UnityEditorInternal;
using UnityEditor;
#endif
public class GameEvent : MonoBehaviour
{
@tsubaki
tsubaki / MySchedule.cs
Created December 22, 2019 08:46
Micro Game のScheduleの挙動
using System.Collections;
using System.Collections.Generic;
using Platformer.Core;
using UnityEngine;
using static Platformer.Core.Simulation;
public class MySchedule : MonoBehaviour
{
void Start()
{
@tsubaki
tsubaki / DisplayPlayerDistance.cs
Created December 8, 2019 12:26
MonoBehaviourとComponentDataの同期
using Unity.Entities;
using UnityEngine;
public class DisplayPlayerDistance : MonoBehaviour
{
DistanceFromPlayerAuthoring fromPlayer;
void Start()
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Jobs.LowLevel;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using Unity.Collections;
using Unity.Collections.LowLevel;
using Unity.Collections.LowLevel.Unsafe;