i have created a text and under text there are two input fields. then i have created a prefabs of them and instantiated through code. and its working, but problem is the instantiated object is empty and does not show anything just a box, is there any solution to the problem i’m facing of.
Here is my code
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class SubmitButton : MonoBehaviour {
public GameObject objects;
// Use this for initialization
public void Start () {
// Debug.Log ("ok");
}
// Update is called once per frame
public void InstantiateButton () {
objects.transform.position = new Vector3 (57.4f, 381.58f, 0f);
Instantiate (Resources.Load ("Prefabs/Bupivacaine"), new Vector3 (57.4f, 381.58f, 0f), Quaternion.identity);
}
}