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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DrawLine : MonoBehaviour | |
{ | |
private Queue<Vector3> queue; | |
private Vector3[] positions; | |
private Camera cachedCamera; |
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 UnityEngine.Playables; | |
public class ClickToEndBehaviour : PlayableBehaviour | |
{ | |
private PlayableDirector director { get; set; } | |
public override void OnPlayableCreate(Playable playable) | |
{ | |
director = (playable.GetGraph().GetResolver() as PlayableDirector); |
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 UnityEditor; | |
using UnityEngine; | |
public class AssetBundleChecker | |
{ | |
[MenuItem("Assets/CreateLink.xml")] | |
static void Create() | |
{ | |
var generator = new LinkXmlGenerator(); | |
// UnityEditor.Animations.AnimatorControllerを取得してしまうので、RuntimeAnimatorControllerに変更 |
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; | |
[ExecuteAlways] | |
public class NotchPadding : MonoBehaviour | |
{ | |
[SerializeField] RectTransform left, right; | |
void Update() | |
{ | |
if (Screen.cutouts == null || Screen.cutouts[0] == null || left == null || right == null) |
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; | |
[RequireComponent(typeof(RectTransform))] | |
[ExecuteAlways] | |
public class SafeAreaPadding : MonoBehaviour | |
{ | |
private DeviceOrientation postOrientation; | |
void Update() | |
{ |
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.Collections.Generic; | |
using UnityEngine; | |
public class MyComponent : MonoBehaviour | |
{ | |
[SerializeReference] List<IMyInterface> dataarray = new List<IMyInterface>(); | |
void Start() | |
{ | |
foreach( var item in dataarray) |
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 Unity.Collections; | |
using Unity.Entities; | |
using Unity.Transforms; | |
using static Unity.Entities.ComponentType; | |
public struct LookAtInitialized : ISystemStateComponentData | |
{ | |
public Entity Value; | |
} |
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 Unity.Entities; | |
using Unity.Transforms; | |
using UnityEngine; | |
/// <summary> | |
/// GameObjectを破棄する時、紐付いているEntityを破棄する。 | |
/// </summary> | |
[RequireComponent(typeof(ConvertToEntity))] | |
[DisallowMultipleComponent] | |
[RequiresEntityConversion] |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.AddressableAssets; | |
public class SpawnerWithAssetReference : MonoBehaviour | |
{ | |
[SerializeField] AssetReferenceGameObject obj; | |
void Awake() |
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 Unity.Entities; | |
using Unity.Physics.Systems; | |
[UpdateAfter(typeof(StepPhysicsWorld))] | |
public class ItemGetSystem: ComponentSystem | |
{ | |
private BuildPhysicsWorld buildPhysicsWorldSystem; | |
private StepPhysicsWorld stepPhysicsWorldSystem; | |
protected override void OnCreate() |