Web player not render content when load from Resource folder.

Hi All,

Currently i am using Unity licensed 4.6 pro version. 

In this i have created the simple project – Where i need to Instantiate the Game object from Resource folder.

In standalone/Editor – The game object is loading at runtime.

but the same is not working in Web player.

 even i checked the **First streamed Level to Zero**.

I need to Instantiate Game object runtime using Resource.load() in Web player.

Kindly help me regarding this…

Thank you in advance..

Do exactly as follows, follow every single step perfectly:

  1. Make a “Resources” folder in your root directory/assets. (Resources with ‘s’ and without quotes)

  2. Create a folder called Level in the Resources folder.

  3. Use the following code to instantiate:

    using UnityEngine;
    using System.Collections;
    
    public class Levels : MonoBehaviour {
    
    public string levelName;
    private GameObject level;
    
    void Start()
    {
     level = Resources.Load("Level/"+levelName);
     Instantiate(level,Vector3.Zero,Quaternion.identity);
    }
    
    }
    

Edit :

Try to avoid Resources.Load. While Resources.Load can be very handy, Unity will not be able to order your assets by when they are first used when you use Resources.Load, because any script could attempt to load the Resource. You can set which level will include all assets that can be loaded through Resources.Load in the Edit->Project Settings->Player using the First Streamed Level With Resources property. Obviously you want to move Resources.Load assets as late as possible into the game or not use the feature at all.

From http://docs.unity3d.com/Manual/WebPlayerStreaming.html

There really is no reason why Resources folder won’t work except for that you probably only have one scene in the game and it’s not set in the player settings as quoted. Resources folder is accessible and functional in unity web player. Please see if there is some minor error in your end, also if you are trying to load up a shader you should specify it in Edit > Project Settings > Graphics.

Dear yusolaifdfer,

Thanks for the response.

  I was using the same, after instantiating the 

Game object is visible only in standalone and Editor view.

But not working in unity webplayer build.

Suggest me regarding this…

thank you in advance…