S2ENGINE HD  1.4.6
Official manual about S2Engine HD editor and programming
ClassInspector

ClassInspector is the tool for creating new objects basing on available classes or for inspecting and editing the parameters of an object just existing into the scene. ClassInspector is just visible when editor starts, but if you close it and you want to reopen it just click on Tools->Class on the main menu:

class_tool01.jpg

or click on the class icon:

class_tool02.jpg

The ClassInspector is divided in two sections: one, on the top, for object creation and one, below, for object editing.

class_tool03.jpg

The object creation section contains the list, per DLL package, of all object classes available. To create objects from scratch please go to Creating objects

Editing object parameters

The parameters of an object that must be stored inside a prefab, and then placed inside a scene, can be edited using the PrefabsInspector, but if you want to edit parameters of an object just existing inside a scene, without being forced to save a prefab, you can use the object editing section of ClassInspector. Simply select the object you want to edit and its parameters will appear in the ClassInspector. When in Editor Mode, if object belongs to the StaticGeom class then parameter changes are instantly applied, for all other objects you must click on Apply button to view changes.

Sending Messages To Object

In S2Engine every object can send messages to other objects and it can process messages received from other objects (see Messages). Messages have a name and a content and can be delayed. Inside an object script you can expose messages (see Exposing messages) in order to make S2Engine editor sending messages to object directly in Editor Mode. This procedure is very useful if you want to test how object process the messages.

Warning
If you want to make script exposed message to be showed inside the ClassInspector you must check the Recompile button before click on Apply to update changes. As showed into the following image:
class_tool14.jpg

When changes applied the list of the exposed object messages appears in the message section. You can send messages to the selected object selecting that to send from the list and specifying parameters if selected message requires them, then clicking on the Send button, as showed into the following image:

class_tool15.jpg
Note
message parameters must be separated by space character.

Editing Physics Shapes

As in PrefabsInspector also in ClassInpector you can add physics shapes to objects. The difference is that in PrefabsInspector Objects are stored into prefabs resources, in ClassInspector shapes are added directly to objects just placed inside the current scene.

Note
As showed in Objects page you can also use the ClassInspector for saving prefabs of selected objects inside the scene.

In S2Engine Scene Objects have one base physics shape that can be configured using following object parameters:

  • dims (vector3) used to define the extension of the collision shape.
  • offset (vector3) used to define the position of the collision shape respect the origin of the object.
  • coltype (enum) used to set the type of shape (box, cylinder, sphere,...).
Note
In the case coltype is mesh you must specify the colmesh parameter without needing to configure dims and offset
Warning
Collision mesh cannot be scaled
See also
Physics, Rigid Body, MeshObject, Vehicle, Character

To show Collision data (also shapes) inside the SceneView you must click on Colliders check button

class_tool16.jpg

Base colliders are showed in violet color, secondary shapes are showed in orange.

class_tool17.jpg

Secondary collision Shapes are edited using the Object Shapes section of the ClassInspector

class_tool18.jpg

Its behavior is identical to the PrefabsInspector Shapes editing behavior.

Editing Points

Points belongs to the AIObject class family. These type of objects are usually used as helpers for the AI system. Generally Points are created just as all other objects using the procedure explained in Creating objects. However there is a particular class of point, Waypoint, that needs a special treatment. Once you have created and places a set of waypoints, in the same ways as in Creating objects, you must connect them.

  1. Select one Waypoint and click on Connect check button as showed into the following image
    class_tool10.jpg

  2. A red line appears starting from selected Waypoint and following mouse cursor. Place cursor on the Waypoint you want to connect and click left button.
    class_tool11.jpg

  3. Select again another Waypoint to connect and repeat the procedure:
    class_tool12.jpg

  4. Repeat the procedure until you have connected all Waypoints you want. Finally you should have less/more the result showed into the following image:
    class_tool13.jpg

Editing Areas

Areas just as Points belongs to the AIObject class family. To create an Area you can use creation tool just as for Creating objects with a bit of difference.

Note
when creating ai objects be sure to check the helper button in Sceneview to show AI objects as helpers inside the scene, as Showed into the following image.
class_tool04.jpg
  1. Check helpers button
  2. Click on Create check button
  3. Select Area class to create

Then you can click inside the SceneView in the place you want to build the area, a red line starting from the point you clicked and ending to the mouse cursor will appear, clicking again you create the first segment of the Area.

class_tool05.jpg

a new red line appear, repeat the procedure until you close the area.

class_tool07.jpg

if you click on the starting point the area will be created.

class_tool08.jpg

After creating the Area , uncheck the Create button. Now you can select, translate and rotate the area as all other objects. If you want to modify the shape of the Area , once selected you can click on the Reshape check button

class_tool09.jpg

Then you can click on one of the area vertex and, left pressed mouse button, move it until you want.

Note
Area vertices are showed as small wireframe white boxes.
See also
AIArea for more info about Areas