🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

com.holoscript.core

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.holoscript.core

HoloScript compiler and runtime for Unity. Compile .hs/.hsplus files to Unity scenes and prefabs.

latest
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

HoloScript for Unity

Official Unity integration for HoloScript — the open platform for spatial worlds.

Features

  • Automatic Asset Import - .hs, .hsplus, and .holo files automatically compile to Unity prefabs
  • Editor Integration - Compile HoloScript directly from Unity Editor menu
  • Runtime Bridge - HoloScript objects integrate seamlessly with Unity components
  • XR Support - Built-in XR Interaction Toolkit compatibility
  • Reactive State - HoloScript's reactive state system maps to Unity's component model
  • Live Preview - See HoloScript changes in real-time (Unity 2022+)

Installation

  • Open Unity Package Manager (Window > Package Manager)
  • Click +Add package from git URL
  • Enter: https://github.com/brianonbased-dev/HoloScript.git?path=/packages/unity-sdk

Via Asset Store

Download from Unity Asset Store

Manual Installation

  • Download the latest .unitypackage from Releases
  • Import into Unity: Assets > Import Package > Custom Package

Quick Start

1. Create a HoloScript Scene

Create a file MyScene.hs in your Unity Assets/ folder:

object "GrabbableCube" @grabbable @throwable {
  geometry: "cube"
  position: [0, 1, -2]
  material: "glass"
  scale: [0.5, 0.5, 0.5]
}

object "FloorPlane" {
  geometry: "plane"
  position: [0, 0, 0]
  scale: [10, 1, 10]
  material: "concrete"
}

2. Unity Auto-Import

Unity will automatically:

  • Detect the .hs file
  • Compile it to a Unity prefab
  • Create GameObjects with appropriate components

3. Use in Scene

Drag the generated prefab into your Unity scene. Done!

Supported HoloScript Traits

TraitUnity ComponentNotes
@grabbableXR Grab InteractableRequires XR Interaction Toolkit
@throwableRigidbodyAdds physics support
@glowingMaterial EmissionEnables glow effect
@animatedAnimatorBinds to animation controller
@teleportableXR Teleportation AnchorVR teleport target

Unity Version Compatibility

Unity VersionHoloScript SDKStatus
Unity 63.0.0+✅ Fully Supported
Unity 2022 LTS3.0.0+✅ Fully Supported
Unity 2021 LTS2.5.0+⚠️ Legacy Support
Unity 2020Not Supported

Configuration

Configure HoloScript compiler settings:

Edit > Project Settings > HoloScript

Settings

  • Compiler Path - Path to holoscript binary (auto-detected)
  • Target Platform - Unity export target (unity, unity-dots, unity-xr)
  • Auto Compile - Automatically compile .hs files on save
  • Enable Linting - Show linting errors in Unity Console
  • Verbose Logging - Enable debug output

Menu Items

Access HoloScript tools via Unity menu:

  • HoloScript > Compile Current Scene - Export Unity scene to HoloScript
  • HoloScript > Settings - Open settings panel
  • HoloScript > Documentation - Open online docs
  • HoloScript > Report Issue - File a bug report

Samples

Import samples from Package Manager:

  • Basic VR Scene - Simple VR scene with grabbable objects
  • Interactive UI - HoloScript UI toolkit integration
  • Voice Commands - Voice command integration example

API Reference

HoloScriptObject Component

Runtime component representing a HoloScript object.

using HoloScript.Runtime;

var hsObject = GetComponent<HoloScriptObject>();
hsObject.CallMethod("onGrab");

Programmatic Compilation

using HoloScript.Editor;

string holoscriptSource = @"
  object 'Test' { geometry: 'cube' }
";

GameObject compiled = HoloScriptCompiler.Compile(holoscriptSource);

Troubleshooting

.hs files not importing

  • Ensure HoloScript Unity SDK is installed
  • Check holoscript compiler is in PATH: holoscript --version
  • Reimport assets: Assets > Reimport All

XR traits not working

  • Install XR Interaction Toolkit: Window > Package Manager > XR Interaction Toolkit
  • Enable XR support: Edit > Project Settings > XR Plug-in Management

Compilation errors

  • Check Unity Console for HoloScript linting errors
  • Validate syntax: holoscript lint MyScene.hs
  • Enable verbose logging in settings

Support

License

MIT License - see LICENSE

Changelog

See CHANGELOG.md for version history.

Keywords

holoscript

FAQs

Package last updated on 23 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts