Enklu Documentation

Enklu Documentation

  • What's New
  • Guides
  • API Reference
  • FAQ
  • Contact

›Scripting

Guides Overview

  • Guides Overview

Web Editor Basics

  • Web Editor Interface
  • Minimum Requirements
  • Managing Your Experiences
  • Sharing Experiences with Others
  • Keyboard Shortcuts
  • Placing an Asset in the Scene
  • Lights
  • Scene Settings
  • Post-Processing
  • Web Play Mode

HoloLens

  • Hololens 2 Basics & Setup
  • Hololens (1st gen) Basics & Setup
  • Voice Commands
  • Live Preview
  • Video Recording
  • Remote Debugging
  • Occlusion

Chapters Series

  • Chapter 1: Intro to Enklu Cloud
  • Chapter 2: Thinking in 3D
  • Chapter 3: Adding Lights & Effects
  • Chapter 4: Adding Interactions

Assets

  • Import Your Own Assets
  • Public Assets
  • Exporting Unity Prefabs
  • Adding Animations from Unity
  • Scene Complexity Recommendations
  • Audio
  • PBR Pipeline

Spaces

  • Creating a Space
  • Updating a Space
  • Adding Anchors
  • Downloading the Scan

Scripting

  • Public Scripts
  • Introduction to Scripting
  • Vine Script Basics
  • Behavior Script Basics
  • Controlling Animations
  • Node SDK

Enklu Embedded

  • Installing Enklu Embedded
  • Embedding an Experience in Your Unity Scene
  • Syncing Assets From Unity

Public Scripts

Enklu Cloud comes with an ever-expanding library of public scripts. These scripts are available to all Enklu Cloud accounts and may be used in any experience.

Script Library

The script library is located in the panel below the canvas. On the left side of the script library is a list of all the experiences your account has access to, meaning you can access scripts across multiple expereinces. There is also a Public category near the top of this list. It gives you access to all of the currently available public scripts. Public script library

Public Scripts

To use a public script, simply select the element you want to attach it to, then drag the script to the Scripts section at the bottom of the inspector. Once you have attatched your script, you can click on the Variables tab to see any exposed variables the script may have.

Drag public orbit script onto planet to make it orbit.

Inspector Variables

Using the Variables tab in the inspector is a quick and easy way to change script parameters without needing to open the script or do any coding. Not every script will have variables exposed to the inspector in this way. Particularly for custom scripts you write yourself, you would have to intentionally include syntax to expose variables to the inspector. But most public scripts will have variables that can be modified from the inspector.

Some examples of what kinds of variables public scripts may use:

Orbit

  • Start Orbit - checkbox that enables or disables the orbit movement
  • X Orbit Radius - field you can type a number into which controls the X influence of the orbit
  • Y Orbit Radius - field you can type a number into which controls the Y influence of the orbit
  • Z Orbit Radius - field you can type a number into which controls the Z influence of the orbit
  • Orbit Trigger Message - text field you can type a message for this script to listen for to trigger the orbit movement

Spin

  • Start Spin - checkbox that enables or disables the spin movement.
  • Spin Speed around X Axis - field you can type a number into to influence how fast the element will spin around its X axis
  • Spin Speed around Y Axis - field you can type a number into to influence how fast the element will spin around its Y axis
  • Spin Speed around Z Axis - field you can type a number into to influence how fast the element will spin around its Z axis

Scale_Basic

  • Test Scale - checkbox which can trigger the scale change
  • X Scaling - field you can type a number into to influence scaling along the X axis
  • Y Scaling - field you can type a number into to influence scaling along the Y axis
  • Z Scaling - field you can type a number into to influence scaling along the Z axis
  • Scale Duration in seconds - field you can type into to determine how long the scaling will take to complete
  • Scale Trigger Message - text field you can type a message to trigger the scaling to start
  • Scale Completed Message - text field you can type a message to dispatch when the scaling has completed
← Downloading the ScanIntroduction to Scripting →
  • Script Library
    • Public Scripts
    • Inspector Variables
Enklu Documentation
Docs
Release NotesGuidesAPI ReferenceFAQ
Social
FacebookInstagramLinkedInTwitter
Community
GitHubSlackUser Feedback
Copyright © 2021 Enklu, Inc.