Set parent in unity easy tutorial
ASSALAM o alaikum Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Addparent : MonoBehaviour
{
public Transform parentToSet;
// Start is called before the first frame update
void Start()
{
SetParent();
}
// Update is called once per frame
void Update()
{
}
public void SetParent()
{
transform.SetParent(parentToSet);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
ASSALAM o alaikum
All codes and concepts and videos from this channel are non copyrighted and free to use because we believe that knowledge should be freely available for everyone
/////////////////////////////////////////////////////////////////////////////////////////////