Universe.Framework.SceneInfo.UuidGatherer.GetAsset C# (CSharp) Method

GetAsset() protected method

Get an asset synchronously, potentially using an asynchronous callback. If the asynchronous callback is used, we will wait for it to complete.
protected GetAsset ( UUID uuid ) : AssetBase
uuid UUID
return Universe.Framework.Services.ClassHelpers.Assets.AssetBase
        protected virtual AssetBase GetAsset (UUID uuid)
        {
            lock (this)
                m_waitingForObjectAsset = true;
            m_assetCache.Get (uuid.ToString (), this, AssetReceived);

            // The asset cache callback can either
            //
            // 1. Complete on the same thread (if the asset is already in the cache) or
            // 2. Come in via a different thread (if we need to go fetch it).
            //
            // The code below handles both these alternatives.
            lock (this)
            {
                if (m_waitingForObjectAsset)
                {
                    Monitor.Wait (this);
                    m_waitingForObjectAsset = false;
                }
            }

            return m_requestedObjectAsset;
        }