public T GetAsset <T>(CAssetDeclaration AssetDecl) where T : CAsset { if (AssetDecl.mAsset == null) { AssetDecl.LoadAsset(); } return((T)AssetDecl.mAsset); }
public T GetAsset <T>(string AssetName) where T : CAsset { // TODO: Ensure that this is really thread safe to call. CAssetDeclaration decl = null; mAssetDeclarations.TryGetValue(AssetName, out decl); if (decl != null) { if (decl.mAsset == null) { decl.LoadAsset(); } return((T)decl.mAsset); } return(null); }