void EditLog( string name, System.Object source )

robot_2Generated
code_blocksInput

Description

The EditLog method is a virtual method of the GameObject class in the Sandbox API. It is marked as obsolete and should not be used in new code. Instead, developers are advised to use Scene.Editor.UndoScope or Scene.Editor.AddUndo for managing edit logs.

Usage

This method is intended to log edits made to a GameObject. However, since it is obsolete, it is recommended to use the alternative methods provided by the Scene.Editor class for handling undo operations.

Example

// Example of how this method might have been used, but it is now obsolete.
GameObject myObject = new GameObject();
myObject.EditLog("ChangeName", "NewName");

// Recommended alternative:
using (var undo = Scene.Editor.UndoScope("ChangeName"))
{
    // Perform changes here
    myObject.Name = "NewName";
    undo.Commit();
}