Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I got error in unity ( This was an internal method which is no longer used'.)

LoadAndVerifyAssembly

line no:-22
error occurred at below highlighted lines


if (www.error != null)
{
//FbDebug.Error(www.error);
if (retryLoadCount ();
#endif
}
www.Dispose();
yield break;
}

#if !UNITY_WINRT
#if UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_EDITOR
var authTokenWww = new WWW(IntegratedPluginCanvasLocation.KeyUrl);
yield return authTokenWww;
if (authTokenWww.error != null)
{
FbDebug.Error("Cannot load from " + IntegratedPluginCanvasLocation.KeyUrl + ": " + authTokenWww.error);
authTokenWww.Dispose();
yield break;
}
var assembly = Security.LoadAndVerifyAssembly(www.bytes, authTokenWww.text);
#else
var assembly = Security.LoadAndVerifyAssembly(www.bytes);
#endif
if (assembly == null)
{
// FbDebug.Error("Could not securely load assembly from " + url);
www.Dispose();
yield break;
}

var facebookClass = assembly.GetType(facebookNamespace + className);
if (facebookClass == null)
{
//FbDebug.Error(className + " not found in assembly!");
www.Dispose();
yield break;
}

What I have tried:

i tried to change LoadAndVerifyAssembly to LoadAssetAsync.

plese tell me how to solve.
Posted
Updated 18-Sep-17 2:03am
Comments
Afzaal Ahmad Zeeshan 18-Sep-17 8:33am    
They are suggesting that you should consider avoiding using the function.

1 solution

See Unity - Scripting API: Security.LoadAndVerifyAssembly[^]:
Quote:
Note that web player is not supported from 5.4.0, so this function no longer serves a purpose and will be deprecated.
So you have to use either an older Unity version or (recommended) remove that code (stop using the web player).

Read also Unity Web Player Roadmap – Unity Blog[^]:
Quote:
So, what does this mean if you want to target the web with Unity from March 2016 onwards? With 5.4, the only option to generate web content in Unity is our WebGL export, which is currently in preview. Unlike the Web Player, WebGL is not a plugin, but uses standard APIs exposed by the browser.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900