Converting types

Updated on May 27, 2017 in General
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on May 27, 2017

This is my error:

Assets/Scripts/HostGame.cs(41,32): error CS0029: Cannot implicitly convert type `string’ to `System.Collections.Generic.List<string>’

I’m trying to get a list of scenes and get unity to recognise them as a network online scene. Any help would be awesome thanks.

public List <string> onlineScene = new List<string> ();

onlineScene = networkManager.onlineScene;

 

P.S

Sorry if this is the wrong category. Looks like the problem here is not limited to networking, if it’s jsut a conversion issue now.

  • Liked by
Reply
1 on May 27, 2017

onlineScene.Add(networkManager.onlineScene);

on May 27, 2017

Thanks a heap that fixed the conversion type.

Show more replies
  • Liked by
Reply
Cancel