当前位置: 首页>>代码示例>>C#>>正文


C# UnityEngine.ToString方法代码示例

本文整理汇总了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;
  }
开发者ID:leapmotion,项目名称:ImageGrid,代码行数:14,代码来源:HMRConfigurationManagerEditor.cs

示例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());
			}
		}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:21,代码来源:CacheManager.cs

示例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;
  }
开发者ID:leapmotion,项目名称:ImageGrid,代码行数:24,代码来源:HMRConfigurationManagerEditor.cs

示例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);
 }
开发者ID:fuutou89,项目名称:AngeVierge,代码行数:5,代码来源:Log.cs

示例5: Error

 public static void Error(object message, UnityEngine.Object context)
 {
     _NotifyError(context.ToString() + " - " + message);
     if (UnityEngine.Debug.isDebugBuild) UnityEngine.Debug.LogError(message, context);
 }
开发者ID:fuutou89,项目名称:AngeVierge,代码行数:5,代码来源:Log.cs

示例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);
        }
开发者ID:takomat-games,项目名称:phenomobileDialogManager,代码行数:40,代码来源:DBModule.cs

示例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());
			}
		}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:29,代码来源:CacheManager.cs

示例8: NotifyButtonPress

	public void NotifyButtonPress (UnityEngine.EventSystems.PointerEventData.InputButton button)
	{
		Debug.Log("The button is being pressed!: " + button.ToString());
	}
开发者ID:wilsonsun,项目名称:DRDC3,代码行数:4,代码来源:Shooter.cs


注:本文中的UnityEngine.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。