大きさを変化させよう

大きさを変化させる
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScaleChange : MonoBehaviour { // 大きさをInspector上で自由に設定できるようにする public Vector3 scale; private void OnTriggerEnter(Collider other) { other.gameObject.transform.localScale = new Vector3(scale.x, scale.y, scale.z); } }
C#



【2019版】BallGame(全27回)
他のコースを見る
大きさを変化させる
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScaleChange : MonoBehaviour { // 大きさをInspector上で自由に設定できるようにする public Vector3 scale; private void OnTriggerEnter(Collider other) { other.gameObject.transform.localScale = new Vector3(scale.x, scale.y, scale.z); } }
C#



大きさを変化させよう