Create a Transform without a GameObject

The Transform class has lots of functionality that I’d like to be able to use, but I don’t want to have to create a GameObject just to transform a list of points.

Is there a way to directly instantiate Transform, or is every instance of Transform a component of a GameObject?

Is there another class that has a TransformPoint method or something similar?

No, Transform is a type of MonoBehaviour (e.g. a component), and cannot be directly constructed from code. There aren’t any other classes provided by Unity that contain Transform’s functionality but in a way that isn’t tied to a GameObject. You could try places like the wiki: http://wiki.unity3d.com/index.php/Scripts/General

Depending on what you want to do, a transform may be easily replicated with two Vector3s (for position and scale) and a quaternion (for rotation). You can then use all the methods of these classes to accomplish translations, rotations, looking at a target, etc.

This could help :slight_smile:

    GameObject emptyGO = new GameObject();
    Transform newTransform = empt.transform;

You can use Pose and even from your transform use the yourTransform.ToPose()