GetSessionWithID() публичный статический Метод

Get the session associated with this session ID. As long as the session was registered, this will return it.
public static GetSessionWithID ( long sessionID ) : HEU_SessionBase
sessionID long Session ID to use for matching to session
Результат HEU_SessionBase
Пример #1
0
		public HEU_SessionBase GetTaskSession()
		{
			if(_forceSessionID == HEU_SessionData.INVALID_SESSION_ID)
			{
				return HEU_SessionManager.GetOrCreateDefaultSession();
			}
			else
			{
				return HEU_SessionManager.GetSessionWithID(_forceSessionID);
			}
		}
Пример #2
0
		//	LOGIC -----------------------------------------------------------------------------------------------------

		private void Awake()
		{
#if HOUDINIENGINEUNITY_ENABLED
			if (_sessionID != HEU_SessionData.INVALID_SESSION_ID)
			{
				HEU_SessionBase session = HEU_SessionManager.GetSessionWithID(_sessionID);
				if (session == null || !HEU_HAPIUtility.IsNodeValidInHoudini(session, _fileNodeID))
				{
					// Reset session and file node IDs if these don't exist (could be from scene load).
					_sessionID = HEU_SessionData.INVALID_SESSION_ID;
					_fileNodeID = HEU_Defines.HEU_INVALID_NODE_ID;
				}
			}
#endif
		}
Пример #3
0
		public HEU_SessionBase GetHoudiniSession(bool bCreateIfNotFound)
		{
			HEU_SessionBase session = (_sessionID != HEU_SessionData.INVALID_SESSION_ID) ? HEU_SessionManager.GetSessionWithID(_sessionID) : null;
			
			if (session == null || !session.IsSessionValid())
			{
				if (bCreateIfNotFound)
				{
					session = HEU_SessionManager.GetOrCreateDefaultSession();
					if (session != null && session.IsSessionValid())
					{
						_sessionID = session.GetSessionData().SessionID;
					}
				}
			}

			return session;
		}