- Home /
Question by
BlueSpaceS · May 23, 2018 at 12:45 AM ·
instantiateprefabvariables
Instantiate prefab with different variables
I created an object which have some variables like "speed", "name", "delaytime"
public float speed, delayTime;
public string enemyName,pathName;
private void Start()
{
_iTweenMove();
}
public void _iTweenMove()
{
iTween.MoveTo(gameObject, iTween.Hash("path",iTweenPath.GetPath(pathName+enemyName), "speed", speed, "delay", delayTime, "movetopath", false,"easetype",iTween.EaseType.linear));
}
After i created another script Spawn to instantiate that object but when instantiate, i want change variables of prefab object because i want to create a lot of prefabs with different variables. How can i do that.
}
Comment
Your answer
Follow this Question
Related Questions
Variable not Assigned 1 Answer
When I instantiate a prefab, I want to assign it custom values. 1 Answer
Instantiate PreFab with C# Script 5 Answers
Instantiate A Prefab 1 Answer