Skip to content

Instantly share code, notes, and snippets.

@tsubaki
tsubaki / FollowSceneCamera.cs
Last active April 23, 2023 16:53
シーンビューの位置カメラの位置を元にカメラを動かす
using UnityEngine;
using System.Collections;
using UnityEditor;
using System;
public class FollowSceneCamera : EditorWindow {
[MenuItem("Window/Camera/FollowSceneCamera")]
static void Init()
{
using UnityEditor;
using UnityEngine;
public class AssetBundleChecker
{
[MenuItem("Assets/CreateLink.xml")]
static void Create()
{
var generator = new LinkXmlGenerator();
// UnityEditor.Animations.AnimatorControllerを取得してしまうので、RuntimeAnimatorControllerに変更
Shader "Unlit/Scroll"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_SubTex1 ("Subtexture1", 2D) = "white" {}
_SubTex2 ("Subtexture2", 2D) = "white" {}
}
SubShader
{
//
// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
// 1. The origin of this software must not be misrepresented; you must not
@tsubaki
tsubaki / FollowTarget.cs
Created November 30, 2018 12:49
対象を追跡するコード
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowTarget : MonoBehaviour
{
[SerializeField] private Transform target;
void Update()
{
using UnityEngine;
[RequireComponent(typeof(RectTransform))]
[ExecuteAlways]
public class SafeAreaPadding : MonoBehaviour
{
private DeviceOrientation postOrientation;
void Update()
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DrawLine : MonoBehaviour
{
private Queue<Vector3> queue;
private Vector3[] positions;
private Camera cachedCamera;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class MyNavmeshBuilder : MonoBehaviour {
public Transform tracker;
public Vector3 size = new Vector3(80.0f, 20.0f, 80.0f);
public int agentTypeID;
@tsubaki
tsubaki / ReplaceMissingAnimationCurve.cs
Last active August 27, 2022 13:35
AnimationCurveのmissingを修正するサポート
using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEditorInternal;
using System.Linq;
using System.Collections.Generic;
public class ReplaceMissingAnimationCurve : EditorWindow
{
Animator animator;
@tsubaki
tsubaki / BindObjectOnDemand.cs
Created April 26, 2017 12:01
Timelineで動的なバインド (トラック用)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using System.Linq;
public class BindObjectOnDemand : MonoBehaviour
{
[SerializeField] Animator character;
[SerializeField] PlayableDirector director;