public static GameObject CreateOneCardManager(CardManager.Card c, GameObject point) { GameObject cardprefab = OneCardManager.GetCardPrefab(c); GameObject cardObject = GameObject.Instantiate(cardprefab, point.transform, false); OneCardManager cardManager = cardObject.GetComponent <OneCardManager>(); cardObject.tag = "Untagged"; if (cardManager.PreviewManager != null) { cardManager.tag = "Untagged"; } //GameObject cardObject = ScriptableObject.Instantiate(cardprefab, point.transform, false); cardObject.transform.localScale = Vector3.one; cardObject.transform.localPosition = new Vector3(0, 0, Visual.instance.transform.position.y); //cardObject.transform.localPosition=new Vector3(0,0,0); //cardObject.transform.SetParent(null); cardObject.SetActive(true); cardManager.cardAsset = c; cardManager.ReadCardFromAsset(); return(cardObject); }