Created
May 27, 2018 08:37
-
-
Save todorok1/afe3c37c28fe9b7ed180c9cf8024eeb6 to your computer and use it in GitHub Desktop.
Script Execution Order Settingの実験
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 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