- Home /
Question by
Nmzikcs · Apr 06, 2013 at 04:38 PM ·
gameobjectmeshlodlodgroup
Assign/add gameobject to LOD via script
Hello!How i can assign/add gameobject to lod? Something like this;
GameObject test;
public LODGroup group;
LOD lod1;
void Update() {
lod1=test;
}
But i have error:cannto convert type GameObject to LOD.How i can add gameobject to lod1 via script?Thanks
Comment
Answer by EliteMossy · Apr 07, 2013 at 02:10 AM
http://docs.unity3d.com/Documentation/ScriptReference/LODGroup.SetLODS.html gives you information on how to do this. It seems you have to re-set all your lods for that LODGroup.
Your answer
Follow this Question
Related Questions
Find Many GameObjects by name 2 Answers
A node in a childnode? 1 Answer
C# Preserving GameObjects' Previous Meshes 1 Answer
Problems with Transform.Find and GameObject.find 1 Answer
C# Array of OtherArray's Meshes 1 Answer