Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Nobuyuki-Kobayashi's full-sized avatar

Nobuyuki Kobayashi Nobuyuki-Kobayashi

  • Unity Technologies Japan
  • Japan
View GitHub Profile
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / CopyTimelineBindings.cs
Created February 7, 2022 05:34
複製したTimeline Assetにバインディング情報をコピーするコンポーネント
//
// CopyTimelineBindings.cs
// https://forum.unity.com/threads/duplicating-a-timeline-loses-all-the-bindings-unity-v2017-2-0b6.488138/
//
// How to use:
//
// 1. このスクリプトを、シーン内のPlayableDirectorコンポーネントがアタッチされているゲームオブジェクトにアタッチする。
// 2. PlayableDirectorにアタッチされているTimeline Assetをプロジェクトウィンドウからデュプリケートする。
// 3. CopyTimelineBindingsコンポーネント中の各スロットに以下のように、指定する
// * Timeline ComponentスロットにPlayableDirectorコンポーネントがアタッチされているゲームオブジェクトを指定する。
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / AutoBlink.cs
Created August 5, 2020 01:00
AutoBlink.cs for Unity-Chan / CRS Unity-Chan
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / DeltaLookAtAxis.cs
Created August 5, 2020 00:54
In cooperation with Mecanim IKLookAt, you can move the UV offset of UnityChan's eye texture. This script is used by attaching to the locator near the center of the eye.
//
// Mecanim IKLookと連動して、ユニティちゃんの瞳テクスチャのUVオフセットを動かす.
// DeltaLookAtAxis.cs
// 本スクリプトは、瞳の中央付近に設定したロケータにアタッチして使用する.
// 2014/09/10 N.Kobayashi @UTJ
//
using UnityEngine;
using System.Collections;
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / IKLookAt.cs
Created August 5, 2020 00:51
IK Look At script for Mecanim/Humanoid. Attach to your character. Before using it, you must turn on IK Pass of the Animator attached to your character.
//
// Mecanim.IkLookAt
// Mecanim.HumanoidでIK Look Atする。キャラクターにアタッチします。
// 使用する前にキャラクターにアタッチされているAnimatorのIK PassをONにしておくこと.
// 2017/01/14 N.Kobayashi
//
using UnityEngine;
using System.Collections;
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / StrippingByVariantCollection.cs
Created April 8, 2020 06:28 — forked from wotakuro/StrippingByVariantCollection.cs
プロジェクト内にあるShaderVariantCollectionにないKeywordはビルドに含まないようにするEditor拡張です
/*
MIT License
Copyright (c) 2020 Yusuke Kurokawa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
using UnityEditor;
using UnityEngine;
public class AssetBundleChecker
{
[MenuItem("Assets/CreateLink.xml")]
static void Create()
{
var generator = new LinkXmlGenerator();
// UnityEditor.Animations.AnimatorControllerを取得してしまうので、RuntimeAnimatorControllerに変更
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.PostProcessing.Utilities;
public class FocusPullerHelper : MonoBehaviour {
private Transform focusObj;
private FocusPuller focusPuller;
private Transform _target;
//
// LookAtConstraintHelperのヘルパー.
// ユニティちゃんのHipsジョイントにつける場合の例.
// unityChanJointHips = GameObject.Find("/CandyRockStar/Character1_Reference/Character1_Hips").transform;
// とやってもいいけど、初期化のプレファブ生成と同時やるとタイミングの面で難しいので、ターゲットにTagを付けたほうがいいです.
//
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//
// https://qiita.com/Akematty/items/04fadac40f7ea45fd5ab
// https://github.com/Unity-Technologies/UnityCsReference/blob/master/Runtime/Animation/ScriptBindings/LookAtConstraint.bindings.cs
// を参考に、LookAt Constraint版ペアレントを動的に追加するヘルパー
//
using UnityEngine;
using UnityEngine.Animations;
namespace UnityChan
//Unitychan Toon Shader ver.2.0
//UTS2GUI.cs for UTS2 v.2.0.7
//nobuyuki@unity3d.com
//https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project
//(C)Unity Technologies Japan/UCL
using UnityEngine;
using UnityEditor;
namespace UnityChan
{