本文整理汇总了C#中UnityEngine.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# UnityEngine.ToString方法的具体用法?C# UnityEngine.ToString怎么用?C# UnityEngine.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine
的用法示例。
在下文中一共展示了UnityEngine.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getImageRetreiverForEye
private LeapImageRetriever getImageRetreiverForEye(UnityEngine.VR.VRNode eyeNode) {
Camera cameraForEye = getCameraObjectForEye(eyeNode);
LeapImageRetriever imageRetrieverForEye = cameraForEye.gameObject.GetComponent<LeapImageRetriever>();
if (cameraForEye == null) {
throw new System.NullReferenceException("Could not resolve the camera for the given eye: " + eyeNode.ToString());
}
if (imageRetrieverForEye == null) {
throw new UnityEngine.MissingComponentException("Could not find LeapImageRetriever component adjacent to camera on " + cameraForEye.gameObject.name + " for the given eye: " + eyeNode.ToString());
}
return imageRetrieverForEye;
}
示例2: SaveCache
public void SaveCache (UnityEngine.Object obj, float remainLife)
{
ObjectType assetType = getAssetType(obj);
if (assetType != ObjectType.None)
{
CachePool pool = null;
cachePoolDic.TryGetValue(assetType, out pool);
if (pool == null)
{
pool = new CachePool();
cachePoolDic[assetType] = pool;
}
pool.Cache(obj, remainLife);
}
else
{
Debug.LogError("Unknown cache type: " + obj.ToString());
}
}
示例3: getCameraObjectForEye
private Camera getCameraObjectForEye(UnityEngine.VR.VRNode cameraNode) {
Camera camera;
switch (cameraNode) {
case UnityEngine.VR.VRNode.CenterEye:
case UnityEngine.VR.VRNode.Head:
camera = ((HMRConfigurationManager)target)._centerCamera;
break;
case UnityEngine.VR.VRNode.LeftEye:
camera = ((HMRConfigurationManager)target)._leftCamera;
break;
case UnityEngine.VR.VRNode.RightEye:
camera = ((HMRConfigurationManager)target)._rightCamera;
break;
default:
throw new System.ArgumentOutOfRangeException("No understoof VRNode provided.");
}
if (camera == null) {
throw new System.NullReferenceException("The camera reference for the " + cameraNode.ToString() + "is missing on " + ((HMRConfigurationManager)target).gameObject.name);
}
return camera;
}
示例4: Exception
public static void Exception(System.Exception exception, UnityEngine.Object context)
{
_NotifyError(context.ToString() + " - " + exception.ToString());
if (UnityEngine.Debug.isDebugBuild) UnityEngine.Debug.LogException(exception, context);
}
示例5: Error
public static void Error(object message, UnityEngine.Object context)
{
_NotifyError(context.ToString() + " - " + message);
if (UnityEngine.Debug.isDebugBuild) UnityEngine.Debug.LogError(message, context);
}
示例6: trackGameAction
/// <summary>
/// @param actionName human readable name of the action. Valid values are defined in com.takomat.modules.model.constants.GameActions
/// @param actionIndex zero based action index
/// @param data optional additional data that might be passed with the event.
/// For the action FINISHED_GAME_YEAR this parameter contains the number
/// of years that have already been played.
///[EventHandler(event = "TrackingEvent.TRACK_ACTION", properties = "actionName, actionIndex, data")]
/// </summary>
public void trackGameAction(string actionName,
int actionIndex,
UnityEngine.Object data )
{
//TODO
string serviceUrl = "/api.php/event/track";
WWWForm param = new WWWForm ();
param.AddField ("actionIndex", actionIndex);
param.AddField ("actionName", actionName);
param.AddField ("data", data.ToString());
bool oldDebugState = debugOutputStopped;
debugOutputStopped = false;
addDebugOutput("\ntrack Game Action");
addDebugOutput("\n\t>actionIndex: " +
actionIndex);
addDebugOutput("\n\t>actionName: " +
actionName);
addDebugOutput("\n\t>data: " +
data);
debugOutputStopped = oldDebugState;
//Checks if _sessionToken is actual
if (_sessionToken != GameManager.Instance.mainGame.GetValue ("sessionToken"))
{
dbModuleEventSession ("", GameManager.Instance.mainGame.GetValue("sessionToken"));
}
param.AddField ("sessionToken", _sessionToken);
sendHTTPRequest (serviceUrl, param, null);
}
示例7: ReleaseCache
public void ReleaseCache (UnityEngine.Object obj, CacheObject.DestroyDelegate destroyCallback)
{
if (obj == null)
{
Debug.LogError("Object you want to release is null!");
return;
}
ObjectType assetType = getAssetType(obj);
if (assetType != ObjectType.None)
{
CachePool pool = null;
cachePoolDic.TryGetValue(assetType, out pool);
if (pool != null)
{
pool.Release(obj, destroyCallback);
}
else
{
Debug.LogError("Cache pool doesn't exist: " + assetType.ToString());
}
}
else
{
Debug.LogError("Unknown cache type: " + obj.ToString());
}
}
示例8: NotifyButtonPress
public void NotifyButtonPress (UnityEngine.EventSystems.PointerEventData.InputButton button)
{
Debug.Log("The button is being pressed!: " + button.ToString());
}