Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections.Generic;
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(MeshFilter))]
public class DynamicCreateMesh : MonoBehaviour
{
// 変更箇所 : Materialを保持するようにする
[SerializeField]
private Material _mat;
using UnityEngine;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
public class JsonTest : MonoBehaviour
{
//---
[System.Serializable]
public class Item
{
using UnityEngine;
using System.Collections;
public class FollowingCocpit_2 : MonoBehaviour {
private Transform _followedTarget;//<! 追従対象
private Transform _cockpitPosTra;//<! コクピット収納位置
private Transform _dummyTarget;//<! 追従対象のダミー(ダメージモーション等のとき、本来の頭の位置に設置する)
private Transform _player;
private float _t = 0f;
using UnityEngine;
using System.Collections;
using RootMotion.FinalIK;
public class HoldCube : MonoBehaviour {
public FullBodyBipedIK ik;
public Transform leftHandTarget, rightHandTarget;
// Update is called once per frame
@tetya
tetya / error
Created October 31, 2016 03:24
10-31 12:09:21.992: I/Finsky(3588): [1] com.google.android.finsky.billing.lightpurchase.PurchaseFragment.a(28697): Error: PurchaseError{type=2 subtype=0}
10-31 12:09:21.992: I/Finsky(3588): [1] com.google.android.finsky.billing.lightpurchase.PurchaseFragment.a(37142): Purchase failed: PurchaseError{type=2 subtype=0}
using UnityEngine;
using System.Collections;
public class MunuAnimationManager : MonoBehaviour {
[SerializeField] private GameObject helpButton;
private Animator animator;
private bool isClosed = true;
void Start(){
@tetya
tetya / SimpleModel.cs
Last active April 28, 2016 02:44
マウス先を向いてくれない
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using live2d;
using live2d.framework;
[ExecuteInEditMode]
public class SimpleModel : MonoBehaviour
{
void AddButton(QuestionDB.QuestionData DataRow, int answerID, int i){
//子オブジェクトとして追加
RectTransform item = GameObject.Instantiate(buttonPrefab) as RectTransform;
//ボタンの表示を割り当てる
item.GetComponentInChildren<Text> ().text = DataRow.answer;
//コンテンツの子オブジェクトにする
item.SetParent(transform, false);
//ボタンに呼び出すメソッドを割り当てる
if(DataRow.id == answerID){
item.GetComponent<Button> ().onClick.AddListener(Correct);
@tetya
tetya / StudyMagager.cs
Last active April 22, 2016 07:08
抜粋
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Linq;
public class StudyManager : MonoBehaviour {
[SerializeField] QuestionDB qDB;
private int[] indexList = new int[10];
@tetya
tetya / Buttom.cs
Created April 20, 2016 07:30
抜粋
public void Select(){
//データーベースにアクセス
SqliteDatabase sqlDB = new SqliteDatabase("save.db");
//上書き
string query = "update User set selectingID = " + id.ToString();
sqlDB.ExecuteNonQuery(query);
//ヘッダーの更新
header.ChangeID (id);
//メニューの操作
menue.ClickMuenuButton();