EllanJiang/GameFramework · error · GameFrameworkException
Can not load binary ' ' which is not exist.
Error message
Can not load binary '{0}' which is not exist. What it means
LoadBinary looks up the binary asset name in the resource index (ResourceInfo). If no resource with that name exists in the built resource list, GameFramework cannot load it. When no LoadBinaryFailureCallback was supplied, it throws a GameFrameworkException instead of reporting the failure through the callback.
Solutions
- Check the binaryAssetName string for typos and verify the file exists in the resource list (compare with the packaged resource list or ResourceInfos).
- Rebuild/refresh the resource package so the binary is included and its ResourceInfo is generated.
- Ensure resource initialization (InitResources/UpdateResources/ApplyResources) has completed before calling LoadBinary.
- Always pass a LoadBinaryCallbacks with LoadBinaryFailureCallback set so failures arrive via callback instead of an exception.
Example fix
// before
m_ResourceComponent.LoadBinary("Configs/mydata", onSuccess, userData); // no failure callback; name not packaged
// after
m_ResourceComponent.LoadBinary("Configs/MyData.bin", new LoadBinaryCallbacks(OnLoadBinarySuccess, OnLoadBinaryFailure), userData);
// and ensure the file is included and packaged into the resource list Defensive patterns
Strategy: validation
Validate before calling
// check the binary exists in the resource index before loading
if (m_ResourceComponent == null || !m_ResourceComponent.CheckBinaryAsset(binaryName))
{
Log.Warning("Binary '{0}' is not packaged or not initialized yet.", binaryName);
return;
}
m_ResourceComponent.LoadBinary(binaryName, callbacks, userData); Type guard
bool IsBinaryAvailable(ResourceComponent rc, string name) => rc != null && !string.IsNullOrEmpty(name) && rc.CheckBinaryAsset(name);
Try / catch
try { m_ResourceComponent.LoadBinary(binaryName, callbacks, userData); }
catch (GameFrameworkException ex) when (ex.Message.Contains("which is not exist"))
{ Log.Error("Binary {0} missing from package: {1}", binaryName, ex.Message); } Prevention
- Always pass a LoadBinaryFailureCallback so failures arrive via callback, not exceptions.
- Keep binary asset names in a constants file or enum, never raw strings at call sites.
- Rebuild and verify the resource package after adding new binary files.
- Gate loading behind resource initialization/update-complete events.
When it happens
Trigger: Calling ResourceComponent/ResourceManager LoadBinary (or LoadBinaryAsync) with a binaryAssetName that is absent from the resource package (missing from the resource list built by the resource editor / ResourceBuilder), or before the resource index has been initialized. Also thrown when the name is misspelled or the asset was not marked as a binary asset at package time.
Common situations: Asset name typos or case mismatch on case-sensitive platforms; forgetting to rebuild the resource package after adding a new binary file; loading during a scene change before ApplyResources/InitResources finished; stripping the binary in build rules so it is not packaged.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Can not load binary ' ' from file system which is not exist.
- Can not load binary ' ' from file system which is not a…
- Can not load binary ' ' from file system which is not ready.
- Can not load binary ' ' from file system which is not use…
- Can not load binary ' ' which is not a binary asset.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/e0f03070d3c6bf49.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.ResourceLoader.cs:575
/// <summary>
/// 异步加载二进制资源。
/// </summary>
/// <param name="binaryAssetName">要加载二进制资源的名称。</param>
/// <param name="loadBinaryCallbacks">加载二进制资源回调函数集。</param>
/// <param name="userData">用户自定义数据。</param>
public void LoadBinary(string binaryAssetName, LoadBinaryCallbacks loadBinaryCallbacks, object userData)
{
ResourceInfo resourceInfo = GetResourceInfo(binaryAssetName);
if (resourceInfo == null)
{
string errorMessage = Utility.Text.Format("Can not load binary '{0}' which is not exist.", binaryAssetName);
if (loadBinaryCallbacks.LoadBinaryFailureCallback != null)
{
loadBinaryCallbacks.LoadBinaryFailureCallback(binaryAssetName, LoadResourceStatus.NotExist, errorMessage, userData);
return;
}
throw new GameFrameworkException(errorMessage);
}
if (!resourceInfo.Ready)
{
string errorMessage = Utility.Text.Format("Can not load binary '{0}' which is not ready.", binaryAssetName);
if (loadBinaryCallbacks.LoadBinaryFailureCallback != null)
{
loadBinaryCallbacks.LoadBinaryFailureCallback(binaryAssetName, LoadResourceStatus.NotReady, errorMessage, userData);
return;
}
throw new GameFrameworkException(errorMessage);
}
if (!resourceInfo.IsLoadFromBinary)
{
string errorMessage = Utility.Text.Format("Can not load binary '{0}' which is not a binary asset.", binaryAssetName);
if (loadBinaryCallbacks.LoadBinaryFailureCallback != null)View on GitHub (pinned to d0c010b051)