- Home /
Unity standard assets has error
Hey running the latest Unity version and I installed the unity standard asset pack from the store and I get the following error "Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs(91,34): error CS0619: UnityEditor.BuildTargetGroup.WebPlayer' is obsolete:
WebPlayer was removed in 5.4, consider using WebGL'
Why does a Unity Standard asset pack have errors?
Is this no longer a supported asset pack?
If this is no longer supported then why not say which version it is for in the store Is this package not for this version?
Many questions, What is the deal with this?
Answer by Hellium · May 03, 2018 at 02:56 PM
Nothing really hard to fix judging by the script
Just remove BuildTargetGroup.WebPlayer
and leave the other build targets
For example:
private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[]
{
BuildTargetGroup.Standalone,
BuildTargetGroup.WebPlayer,
BuildTargetGroup.Android,
BuildTargetGroup.iOS,
BuildTargetGroup.WP8,
BuildTargetGroup.BlackBerry
};
Becomes
private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[]
{
BuildTargetGroup.Standalone,
BuildTargetGroup.Android,
BuildTargetGroup.iOS,
BuildTargetGroup.WP8,
BuildTargetGroup.BlackBerry
};
Because Unity Technologies did not take the time to update the package.
The package is compatible for Unity 5.0+, and the web player was still supported on this version.
I had the same problem and your answer has solved it. Thank you very much, Hellium.
Answer by adamshortuk · May 19 at 11:04 AM
To resolve this issue, add the following line;
BuildTargetGroup.WebGL,
Like so...
private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[]
{
BuildTargetGroup.Standalone,
BuildTargetGroup.WebGL,
BuildTargetGroup.Android,
BuildTargetGroup.iOS,
BuildTargetGroup.WP8,
BuildTargetGroup.BlackBerry
};
NB Tested on Unity 2020.3.31f1
Your answer
Follow this Question
Related Questions
Unity Standard Assets Mobile First Person Controls not jumping 1 Answer
convert standard firstpersoncharacter into multiplayer 2 Answers
First post - Some assets, game objects do not compile with my Unity 2017.3 projects 1 Answer
How can I stop the standard car asset auto reversing with Logitech steering wheel 3 Answers
Unity overwrites old image effects and standard assets after system restore 0 Answers