Skip to content

Instantly share code, notes, and snippets.

Tatsuhiko Yamamura tsubaki

Block or report user

Report or block tsubaki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tsubaki
tsubaki / SomeAnimations.cs
Last active Jun 9, 2019
AnimationClipPlayableを使いまわす
View SomeAnimations.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;
using UnityEngine.Profiling;
public class LoopSomeAnimations : MonoBehaviour
{
[SerializeField] AnimationClip[] clips = null;
@tsubaki
tsubaki / TransparentShadowCollector.shader
Last active Jun 9, 2019
透明な床に影を落とすシェーダー改
View TransparentShadowCollector.shader
Shader "Custom/TransparentShadowCollector"
{
Properties
{
_ShadowIntensity ("Shadow Intensity", Range (0, 1)) = 0.6
}
SubShader
{
View SpawnerWithAssetReference.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
public class SpawnerWithAssetReference : MonoBehaviour
{
[SerializeField] AssetReferenceGameObject obj;
void Awake()
@tsubaki
tsubaki / Loby.cs
Created Jul 4, 2013
Photon Cloudのロビーほぼ最小構成
View Loby.cs
using UnityEngine;
using System.Collections;
public class Loby : MonoBehaviour
{
void OnEnable ()
{
// サーバー接続
PhotonNetwork.ConnectUsingSettings ("0.1");
}
View InsertAnimation.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;
public class InsertAnimation : MonoBehaviour
{
private PlayableGraph graph;
private AnimationPlayableOutput output;
@tsubaki
tsubaki / ItemGetSystem.cs
Created Apr 25, 2019
Unity Physicsの使用例
View ItemGetSystem.cs
using Unity.Entities;
using Unity.Physics.Systems;
[UpdateAfter(typeof(StepPhysicsWorld))]
public class ItemGetSystem: ComponentSystem
{
private BuildPhysicsWorld buildPhysicsWorldSystem;
private StepPhysicsWorld stepPhysicsWorldSystem;
protected override void OnCreate()
@tsubaki
tsubaki / JsonSplitSprite.cs
Last active Apr 24, 2019
Json(exported with texture packer) -> unity 2d Multiple sprite . (request minijson https://gist.github.com/darktable/1411710)
View JsonSplitSprite.cs
// --
// The MIT License
//
// Copyright (c) 2013 tatsuhiko yamamura
//
// 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 furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
View CopyTransformToGameObjectConvert.cs
using Unity.Entities;
using Unity.Transforms;
using UnityEngine;
public class CopyTransformToGameObjectConvert : MonoBehaviour, IConvertGameObjectToEntity
{
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddComponentData(entity, new CopyTransformToGameObject());
}
@tsubaki
tsubaki / ChangeTargetAnimator.cs
Created Jul 30, 2017
PlayableOutputのターゲットを切り替えるサンプル
View ChangeTargetAnimator.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;
public class ChangeTargetAnimator : MonoBehaviour
{
PlayableGraph graph;
AnimationPlayableOutput output;
View HitTestSystem.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Physics;
using Unity.Mathematics;
using Unity.Transforms;
using Unity.Entities;
using Unity.Physics.Systems;
[AlwaysUpdateSystem]
You can’t perform that action at this time.