Question by
AlwayzPatrick · Oct 11, 2016 at 08:47 PM ·
errornetworkingarrayprefabs
Unity Networking Prefab cant load scene assets
I have a prefab for a player but when i make it that it spawns them automatically when joining. but then it didnt save the script objects that needed to be loaded.
if i want to select them it says that there are none.
so is there a way to add automatically a script item of a gameobject to a array i tried:
public GameObject[] TempObjects;
public DHDGlyph[] Glyphs;
TempObjects = GameObject.FindGameObjectsWithTag("Glyph");
Glyphs = new DHDGlyph[TempObjects.Length];
foreach (DHDGlyph Glyph in Glyphs)
{
for (int i = 0; i < TempObjects.Length; i++)
{
DHDGlyph[i] = TempObjects[i].GetComponent<DHDGlyph>();
}
}
ERROR: Expression denotes a type', where a
variable', value' or
method group' was expected
Comment
Your answer
Follow this Question
Related Questions
UNet Networking problem 1 Answer
object.activeSelf and object.activeInheirarchy Both not working 0 Answers
Unity [PUN] New Instantiated players cannot see previously instantiated players 0 Answers
How to mount a camera for player in online 0 Answers
NullReferenceException: Object reference not set to an instance of an object 0 Answers