Hi, i do have a couple of smaller questions: a) What Format-Parameters can "toString()" handle? Is this documented anywhere? b) How do i perform an action on an object which i destroy by using the"destroy(obj,secs)" method when the object get's destroyed. Is there anything like "function on_destroy_me {} then"? c) Is there any way i can access a public global variable from and to all scripts without naming a certain script? d) How to bring an object into a specified rotation. I don't want to rotate it about a ceratin degree i want it to be in the rotation i give the vector(x,y,z) for. And can i choose if this rotation is meant in local space, world space or a specified parent space? Thanks, taumel
Well, I guess now that this has been resurrected, may aswell answer the post and add something of value if it is found again in the future. A) ToString has so many uses I cant list them all (I remember a list on the MSDN website a while ago but I cannot find it). Anyone can override ToString but some of its default uses for things like numbers are: ToString("N2") - Print number to 2 decimal places. ToString("C", SomeCulture) - Print number as currency EDIT: Found it: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings B) OnDestroy perhaps C) Not sure exactly what is meant here. I assume a static but without having to reference a class too. I do not think this is possible. Only enums do not have to belong to a class. D) Quaternion.Euler perhaps Feel free to close this thread now