Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 27, 2018 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/afe3c37c28fe9b7ed180c9cf8024eeb6 to your computer and use it in GitHub Desktop.
Save todorok1/afe3c37c28fe9b7ed180c9cf8024eeb6 to your computer and use it in GitHub Desktop.
Script Execution Order Settingの実験
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CyanScript : MonoBehaviour {
void Start(){
Debug.Log(gameObject.name + " : Startが呼ばれたよ。");
}
void Update(){
if (Time.frameCount == 5){
gameObject.AddComponent<Rigidbody>();
Debug.Log(gameObject.name + " : ふーん、アンタが私のRigidbody? ……まぁ、悪くないかな。");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment