Giter Site home page Giter Site logo

am1goo / nothingos.unity Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 98 KB

The SDK provides native APIs for all of the essential Glyph features on Nothing Phone.

Home Page: https://github.com/am1goo/NothingOS.Unity

License: MIT License

C# 100.00%
android animation gdk glyphs london nothing sdk nothingos

nothingos.unity's Introduction

GitHub Issues or Pull Requests GitHub Issues or Pull Requests GitHub License

openupm

nothing_logo

NothingOS for Unity

This SDK provides native APIs for all of the essential Glyph features on Nothing Phone.

Features

  • glyph-based progress bars
  • custom glyph animations
  • supports all range of distributed devices (Phone 1, Phone 2, Phone 2a)

What's inside?

How to use

  • First of all, you need to obtain API Key from Nothing Company by filling out the request form
  • In addition, you have to create NothingSettings scriptable object in any folder into Assets folder and place this API key in it.
  • The last step is to write your own code and make Nothing Phone light!
Example:
using NothingOS;
using NothingOS.Glyphs;

public class Example : MonoBehaviour
{
    void Start()
    {
        Nothing.Initialize();
    }

    void OnApplicationQuit()
    {
        Nothing.Shutdown();
    }

    void Update()
    {
        using (var builder = Nothing.glyphs.Builder())
        {
            builder
            .SetPeriod(TimeSpan.FromSeconds(0.5f))
            .SetInterval(TimeSpan.FromSeconds(0.25f))
            .SetCycles(3)
            .SetChannel(GlyphBuilder.Channel.ChannelA)
            .SetChannelB();

            using (var frame = builder.Build())
            {
                Nothing.glyphs.Animate(frame);
            }
        }
    }
}

Installation

via Unity Package Manager

The latest version can be installed via package manager using following git URL:
https://github.com/am1goo/NothingOS.Unity.git#1.0.1

via OpenUPM

The latest version can be installed via using following URL:
https://openupm.com/packages/com.am1goo.nothingos.gdk

Requirements

  • Minimal SDK 19 (Android 4.4, KitKat)

Limitations

This plugin works only on SDK 34 or newer (Android 14, Upside Down Cake), on other devices it just do nothing.

Tested in

  • Unity 2019.4.x
  • Unity 2020.3.x

Contribute

Contribution in any form is very welcome. Bugs, feature requests or feedback can be reported in form of Issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.