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> | |
/// Prefabからオブジェクトを生成するサンプルスクリプトです。 | |
/// </Summary> | |
public class PrefabInstantiateSample : MonoBehaviour | |
{ | |
// オブジェクトを生成する元となるPrefabへの参照を保持します。 |
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
void Start() | |
{ | |
Application.targetFrameRate = 60; | |
} |
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; | |
using TMPro; | |
/// <Summary> | |
/// シーンのフレームレートを計測して画面に表示するスクリプトです。 | |
/// </Summary> | |
public class FpsChecker : MonoBehaviour | |
{ |
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> | |
/// GetComponentを使用して他のスクリプトからメソッドを呼び出します。 | |
/// </Summary> | |
public class GetComponentTarget : MonoBehaviour | |
{ | |
void Start() |
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> | |
/// GetComponentを使用して他のスクリプトのメソッドを呼び出します。 | |
/// </Summary> | |
public class GetComponentCaller : MonoBehaviour | |
{ | |
public GameObject targetObj; |
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; | |
using UnityEngine.EventSystems; | |
/// <Summary> | |
/// EventSystemsで使用するインタフェースです。 | |
/// </Summary> | |
public interface IEventCaller : IEventSystemHandler | |
{ |
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> | |
/// EventSystemsを使用してメソッドを呼び出されるスクリプトです。 | |
/// </Summary> | |
public class EventSystemsTarget : MonoBehaviour, IEventCaller | |
{ | |
void Start() |
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; | |
using UnityEngine.EventSystems; | |
/// <Summary> | |
/// EventSystemsを使用して他のスクリプトのメソッドを呼び出します。 | |
/// </Summary> | |
public class EventSystemsCaller : MonoBehaviour | |
{ |
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
/// <Summary> | |
/// SendMessageで処理が呼び出されるメソッドです。 | |
/// </Summary> | |
public class SendMessageTarget : MonoBehaviour | |
{ | |
/// <Summary> | |
/// SendMessageを使って対象のスクリプトの処理を呼び出します。 | |
/// </Summary> | |
public void ShowLog() | |
{ |
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
/// <Summary> | |
/// SendMessageを使って対象のスクリプトの処理を呼び出します。 | |
/// </Summary> | |
public class SendMessageCaller : MonoBehaviour | |
{ | |
public GameObject targetObj; | |
void Start() | |
{ | |
targetObj.SendMessage("ShowLog"); |
NewerOlder