概要
using System.Runtime.CompilerServices;
using UnityEngine;
public sealed class Example : MonoBehaviour
{
private void Start()
{
Test( "ピカチュウ" );
}
private void Test
(
string message,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0
)
{
Debug.Log( "message: " + message );
Debug.Log( "memberName: " + memberName );
Debug.Log( "sourceFilePath: " + sourceFilePath );
Debug.Log( "sourceLineNumber: " + sourceLineNumber );
}
}
- Unity 2020.1.6f1、Android IL2CPP ビルド、iOS IL2CPP ビルドで動作確認済み