welens / lenscast-unity-sdk Goto Github PK
View Code? Open in Web Editor NEWLensCast SDK for Unity Applications
LensCast SDK for Unity Applications
Simulate a JSON object being received through a network interface. Initially, these objects can be hard-coded for testing purposes. The data contained within the object is then passed to a delegate function defined by the client application.
The JSON object will either just contain an action object like in the first example below, or will contain an action object with a nested value object contained within it, like the second example.
{
"remoteCommand": {
"timestamp": 1529103309,
"action": {
"id": "reset_level",
"name": "Reset Level"
}
}
}
{
"remoteCommand": {
"timestamp": 1529103309,
"action": {
"id": "change_difficulty",
"name": "Change Difficulty",
"value": {
"id": "medium",
"name": "Medium Mode"
}
}
}
}
The client application using the SDK should be able to import it, and then be able to do something approximating the following, where it assigns a delegate function to a LensCast.onRemoteCommand
event that accepts an action param that can be examined and resulting in specified events firing as seen in the example below:
void OnInit() {
// This code only needs to be run once when the app is initialized
LensCast.onRemoteCommand += CustomHandlerFunction;
}
void CustomHandlerFunction(object action)
{
if (action.id == "set_level"){
SetLevel(action.value.id); // example integration with app-specific logic
}
if (action.id == "set_difficulty"){
SetDifficulty(action.value.id); // example integration with app-specific logic
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.