-
-
Save todorok1/cf0da2daee8531e9f9582860526f7ef9 to your computer and use it in GitHub Desktop.
対象のゲームオブジェクトを破棄するスクリプトです。
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; | |
/// <Summary> | |
/// 対象のゲームオブジェクトを破棄するスクリプトです。 | |
/// </Summary> | |
public class ObjectDestroyer : MonoBehaviour | |
{ | |
// 破棄するオブジェクトへの参照を保持します。 | |
public GameObject targetObj; | |
void Start() | |
{ | |
// 引数のGameObjectを破棄します。 | |
Destroy(targetObj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment