Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Quick Start

Daniel Everland edited this page Nov 23, 2019 · 17 revisions

Table of Contents

Requirement

The first thing you should do, is ensure your Unity editor version is compatible with SO-A. You currently need Unity version 2017.3 or higher

Installation Instructions

There are three ways you can install SO-A. Here's a short guide that explains the pros and cons of each method

+ Get updates as soon as they're ready.

+ Has an in-editor manager for updates.

+ Assets are kept in a separate section, which reduces clutter in project-view

+/- Assets will be locked, so you can't modify the source code in any way. Whether this is a good or bad thing is up to you

- Not properly supported until 2018.1

+ Has an in-editor manager for updates.

- Updates can take several days to be published, due to manual verification step by Unity.

- Installation and updating can be tedious

- No in-editor way to check for updates.

Unity Package Manager Instructions

  1. Ensure you're using Unity 2018.1 or higher
  2. Open your asset folder

  1. Open the "Packages" folder

  1. Open the "manifest.json" file in a text editor

  1. Add the following to your dependencies

"com.danieleverland.scriptableobjectarchitecture": "https://github.com/DanielEverland/ScriptableObject-Architecture.git#release/stable",

  1. Save changes. Unity will automatically import the package.

Unity Asset Store Instructions

  1. Open the Unity Asset Store window

  1. Search for "ScriptableObject-Architecture"

  1. Select the ScriptableObject-Architecture package and click on "IMPORT"

  1. Import all assets

Manual Installation

  1. Navigate to the GitHub Release Page

  2. Open the newest release and click on the .unitypackage file

  1. In Unity, click on Assets > Import Package > Custom Package...

  1. Select the downloaded .unitypackage file

  1. Import all assets

Tutorial

Under Construction

Throughout this tutorial I'll take you through the step-by-step instructions for using the following features of ScriptableObject-Architecture

  • Variables
  • Clamped Variable
  • References
  • Events
  • Typed events
  • Runtime sets

This will also give you a fundamental understanding of how using scriptable objects can improve your architecture in terms of decoupling systems and debugging them.

In order to keep the length of this tutorial manageable, I will only describe code and concepts relating to SO-A specifically. Everything else, like how to register collisions in Unity, code snippets for code that makes the player move etc. will not be covered. The entire repository is available in the branch called "tutorial", though, in case you want to check it out.

Creating a Player

  • Player (Variables - Max Health, Clamped Variables - Current Health, References)

Adding a healthbar

  • Health UI (Events - OnDamagedEvent, decoupling)

Taking damage

  • Damage Indicator (Typed event)

Placing cubes

  • Placing Cubes (Runtime sets)
Clone this wiki locally