This file contains 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 System.Collections; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class UIScrollViewPool : MonoBehaviour | |
{ | |
Stack<HogeItemComponent> stackIcons = new Stack<HogeItemComponent>(); | |
// NGUIの場合はUIWidgetでなければ描画がおかしくなる。UnityUIとかならGameObjectでも良いかも? |
This file contains 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 System.Collections.Generic; | |
using System.Collections; | |
using System; | |
[RequireComponent (typeof(Animation))] | |
public class AnimationFinishEventTrigger : MonoBehaviour | |
{ |
This file contains 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
ReactiveCollection<Hoge> Hoges; | |
// Hogesにかかるあらゆる変更を取得する | |
IObservable<ReactiveCollection<Hoge>> observeChanged; | |
public IObservable<ReactiveCollection<Hoge>> ObserveChanged() | |
{ | |
if (observeChanged == null) | |
{ | |
observeChanged = Hoges.ObserveReplace().Select(x => Hoges) | |
.Merge(Hoges.ObserveCountChanged().Select(x => Hoges)) |
This file contains 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
// ここで表題のエラーが出る | |
EditorGUI.PropertyField(rect, action.FindPropertyRelative("targetPosition")); |
This file contains 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
Button buttonA; | |
Button buttonB; | |
var disporserA = buttonA.ClickAsObservable() | |
.Subscribe(_ => | |
{ | |
Debug.Log("Aが押された"); | |
}).AddTo(this); | |
var disporserB = buttonB.ClickAsObservable() |
This file contains 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
個人的に使えそうなのをまとめたい |
This file contains 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 UnityEditor; | |
using UniRx; | |
using System.Linq; | |
using System; | |
public class GameObjectFindEditor | |
{ | |
public string FindName { get; set; } | |
private string buttonName = "FindGameObject"; |
This file contains 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
Shader "Unlit/toon" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_ShadowColor ("ShadowColor", Color) = (1,1,1,1) | |
_TextureBorder ("TextureBorder", Range(1,0)) = 0.7 | |
_ShadowBorder ("ShadowBorder", Range(1,0)) = 0.3 | |
_LambertCorrect ("_LambertCorrect", Range(1,0)) = 0.5 | |
_MiddleShadow ("_MiddleShadow", Range(1,0)) = 0.5 |