Skip to content

zappy-dev/Schema-Unity

Repository files navigation

Schema-Unity

openupm openupm Unity CI codecov GitHub Sponsors Ko‑fi

Try Schema

Schema-Unity provides Unity integrations for the Schema content management tool, enabling robust, flexible, and maintainable management of game design data within Unity projects.

Overview

Schema Overview Video on YouTube

Click to watch overview video

Highlights

  • Table editor with fast, virtualized grid and publishing

    Schema Table View

  • Rich attribute type system

    Scheme Type Selection

  • Code Generation for Runtime usage

public partial class ProfilesEntry : EntryWrapper
{
        /// <summary>
        /// Represents a single entry (row) in the 'Profiles' data scheme.
        /// </summary>
        public ProfilesEntry(DataScheme dataScheme, DataEntry entry) : base(dataScheme, entry) {}

     
        /// <summary>
        /// Gets the value of 'ID'.
        /// </summary>
     
        public string ID => DataEntry.GetDataAsString("ID");
     
        /// <summary>
        /// Gets the value of 'Personality Notes'.
        /// </summary>
     
        public string PersonalityNotes => DataEntry.GetDataAsString("Personality Notes");
     
        /// <summary>
        /// Gets the value of 'InitialPlayerConnection'.
        /// </summary>
     
        public bool InitialPlayerConnection => DataEntry.GetDataAsBool("InitialPlayerConnection");
     
        /// <summary>
        /// Gets the value of 'Profile Picture'.
        /// </summary>
     
        public string ProfilePicture => DataEntry.GetDataAsString("Profile Picture");
 
    }

Documentation

Features

  • Schema Core: C# library for defining, loading, and validating data schemas.
  • Unity Integration: Custom Unity editor tools for managing schema-based data.
  • Sample Content: Example JSON and CSV files for rapid prototyping and testing.
  • Extensible: Easily add new data types, serialization formats, and editor extensions.

Getting Started

See the full Quickstart.

1) Quick Start: Integrate into an existing project (Unity Package Manager)

Install via OpenUPM

  1. Open Edit/Project Settings/Package Manager
  2. Add a new Scoped Registry (or edit the existing OpenUPM entry)
    • Name: package.openupm.com
    • URL: https://package.openupm.com
    • Scope(s): com.devzappy.schema.unity
  3. Click Save or Apply
  4. Open Window/Package Manager
    • Click +
    • Select Add package by name... or Add package from git URL...
    • Paste com.devzappy.schema.unity into name
    • Paste 0.3.1 into version
    • Click Add

Alternatively, merge the snippet to Packages/manifest.json

{
    "scopedRegistries": [
        {
            "name": "package.openupm.com",
            "url": "https://package.openupm.com",
            "scopes": [
                "com.devzappy.schema.unity"
            ]
        }
    ],
    "dependencies": {
        "com.devzappy.schema.unity": "0.3.1"
    }
}

Install via Git URL (no download required):

  1. Open your Unity project

  2. Open Window > Package Manager

  3. Click + and select Add package from git URL...

  4. Paste: https://github.com/zappy-dev/Schema-Unity.git?path=/SchemaPlayground/Packages/com.devzappy.schema.unity#main

  5. After install, open Tools > Schema Editor

    Open Schema Editor

Try it quickly (optional):

  • Create a simple scheme and entries, then publish and generate C#.
  • Initialize at runtime with Schema.Runtime.SchemaRuntime.Initialize().

2) Local Setup (clone the repo)

Prerequisites:

  • Unity (2021.3+ recommended)
  • .NET SDK 8 (for building and testing core libraries)

Steps:

  1. Clone:
    git clone https://github.com/zappy-dev/Schema-Unity.git
    cd Schema-Unity
  2. Open SchemaPlayground/ in Unity
  3. Try it now:
    • Load Assets/Scenes/SampleScene.unity
    • Open Tools > Schema Editor and explore Manifest, Entities, Quests
    • Press Play to see the Player2DController sample
  4. Build core libraries (optional):
    • Open Schema/Schema.sln in Visual Studio or Rider and build
  5. Run tests (optional):
    • dotnet test Schema/Schema.Core.Tests/Schema.Core.Tests.csproj

Add as local package from disk (optional):

  1. Window > Package Manager
  2. Click + > Add package from disk...
  3. Select SchemaPlayground/Packages/com.devzappy.schema.unity/package.json

Usage

  • Use the Unity Editor tools (under Tools > Schema Editor) to import, edit, and validate schema-based data.
  • Place your JSON/CSV data files in SchemaPlayground/Content/.
  • Extend or customize schema definitions in SchemaPlayground/Packages/com.devzappy.schema.unity/Core/Data/.

Project Structure

Schema-Unity/
  Schema/                  # Core C# library and tests
    Schema.Core/
    Schema.Core.Tests/
  SchemaPlayground/        # Unity project with sample content and editor extensions
    Content/
    Packages/
      com.devzappy.schema.unity/
        Core/
        Editor/
  docs/                    # Guides and reference documentation

Contributing

Contributions are welcome! See docs/Contributing.

Support

For help, email support@devzappy.com.

If you find Schema-Unity helpful and want to support ongoing development:

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Schema is a content management tool for game design data.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages