Possible to create your OWN transform in code

Hi! I got a problem. I need to use transforms child feaature but I can’ät use the real transforms. I need to create new traansforms. The transform can be null at some points.

For example:
Transform main = new Transform();

Transform child1 = new Transform();

child1.parent = main;

This works in theory BUT the transform constructor is protected.
Any help?

Late to the party, but technically this will do what you’re asking:

Transform main = new GameObject("main").transform;
Transform child1 = new GameObject("child1").transform;