Skip to main content
Version: 4.55.1

Content Editor Tools - Template

This Content Editor Tools template demonstrates all the Content Editor Tools custom components all working together in unison. It is based on the Custom Landmarkers template to demonstrate the Spatial Persistence capabilities of the Content Editor Tools.

Please visit the Content Editor Tools documentation to learn more about the features included with the Content Editor Tools.

The template demonstrates the Content Tools working with a Custom Landmarker. However, it can also be used with a Cityscale Landmarker, or without persistence in an ordinary lens.

To try the lens without a Custom Landmarker ID, you can tap edit mode to skip the hint screens. To remove a Custom Landmarker altogether for a project, delete the custom Custom Landmark SceneObjects and the ContentStorage component.

To use the template with a City Landmark replace the LocationAsset on the DeviceLocationTrackingComponent and the ContentStorage component with a LocationAsset set to World.

Adding your own assets

To add your own asset for users to place and manipulate, follow these steps:

  1. Create a new SceneObject.

    1. If you do not have a SceneObject you wish to use already, add your content to it.

    1. In this example, we will add Mark the Monster from the Asset Library.

  2. Add a Content Editable component

    1. The Content Editor works for any SceneObject with a Content Editable component attached

    1. This box shape determines the selectable area of your object, so ideally the Content Editable component’s box shape should contain all the visible content of your asset. To adjust the size of the box, you can change the Content Editable’s property Collider Size

  3. Next add a Persistable component

    1. If you are using a Content Storage component and want this asset to spatially persist, add a Persistable component to it.

  4. Create a prefab for your asset

    1. You can create a prefab of your asset by dragging your SceneObject into your Resources panel.

  5. Add Prefab to the Content Provider

    1. Update the Content Provider component to know about your new prefab asset so that users can place it.
      1. You can duplicate one of the existing Content Provider Option components.

Next, add your prefab to the Content Provider Option. You will also need to add a small texture to be used as an icon on the scrolling selection bar, and a unique key that identifies this specific asset.

The unique key can be as simple as box or circle. The main point is to ensure that no two assets share the same key in your lens. It is used by the various content editor tools to identify which asset is which.

Now users can place instances of the Mark the Monster asset, and when they reopen their lens again, the content will be where they last left it.

With an understanding of how to get started with Content Editor Tools, you can refer to the following guides and templates below to learn more;

Was this page helpful?
Yes
No