Giter Club home page Giter Club logo

unite2017's Introduction

unite2017's People

Contributors

aroman avatar roboryantron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unite2017's Issues

Handling multiple instances of objects (ie PlayerHealth, but multiple player's)

Hey there, great talk..I'll be posting some questions and this is the first one.

A lot of your examples seem to fall apart when we start looking at "real world" examples where you would have multiple enemies, players, etc.

Let's look at your example with player prefab that has a Simple health component that reference the PlayerHealth asset. The UI would be wired up to look at this one health asset. What if I wanted to make a split screen game? Multiple player's? Seems like there would be a need to have to constantly instantiate new copies of these persistent scriptable assets so every player gets their own one. This would mean, if I wanted to display a health bar above players heads, I would have to (through code, at runtime), manually set the PlayerHealth reference on the Healthbar script to that players PlayerHealth variable.

player2Healthbar.SetHealthReference(player2Instance.PlayerHealth)

This goes against keeping everything modular but I can't see a way around it.

A better example might be enenies with Healthbar above their heads. They all need their own instance of EnemyHealth and all the Healthbars would need to be pointed at the correct EnemyHealth instance at runtime.

Setter for Value property in FloatReference

Hello Ryan! I'm probably very late but amazing sharing; it completely changed the way on how I worked with Unity and this is so beneficial. Thank you!

I am thinking of adding a set to the Value property so that when other scripts assign a value, the Value property can receive it, then modify, based on whether UseConstant is true or false, ConstantValue or Variable.Value.

The property will look like this:

public float Value
{
    get { return UseConstant ? ConstantValue : Variable.Value; }
    set
    {
        if (UseConstant)
            ConstantValue = value;
        else
            Variable.Value = value;
    }
}

And in other scripts, one can simply do something like this:

public FloatReference hp;
.
.
.
hp.Value = 10;

So far, the only implication I have seen was that setting via a FloatReference, you may be expecting a variable to get updated, but if UseConstant is true, the constant is updated and not the variable. So, for example, if you decrement the player's HP and the HP is of type FloatReference with UseConstant set to true, then this may not update the UI for the HP (e.g. say a HP bar) which depends on a FloatVariable to determine the fill amount, making others think that the player's HP is not decreasing.

But then if such a case happens, FloatVariable should be used to adjust HP instead of FloatReference, which will make it clear to the team that modifications made to it will be clearly shown.

Event send an arg

Hi, this system is exactly what I need.

Still learning how to use it.

Is there a way to send data with that event being raised? (e.g. send the gameobject or object name from which the event was raised)

Inventory Demo

Hi Ryan,

I am very happy to see new ScriptableObjects stuff. There are limited source when its come to architecture in unity. In your presentation demo I saw inventory in project root. Sadly, you had not enough time to show on unite event. I would like to see what you were to present about inventory.

Thank you

Type mismatch in Demo05_Sets

Hi! Great talk, i wanted to push your ideas to our team, but found something dirty (type mismatch)
fxbhfcgrrm_qgdhjapxnxa

Why is it happening? I just opened project and launched demo

I think the reason for that is referencing scene objects from asset, as it can't save them.
And if it would be actual type mismatch - i would get error when adding to the list :c

So is it fine? Can i ignore it and draw names of the scene obejcts in custom editor for that EnabledThings for example?

ScriptableObjectsEvents on build, Android not working.

Hi!
I've been trying to implement a EventManager system with scriptableObjects following your system.
Using GameEventListener and GameEvents.

https://drive.google.com/open?id=10qbMMY9oPzcCfW6nZLAHugA6Q7ToXotX
https://drive.google.com/open?id=1LDdapYIDncnNL4M0TEmoaFqsWv2mUMeo
https://drive.google.com/open?id=140IufZd1ppF-rP8JUmnZ9uYXQb1PYfWr

On the editor it works perfectly, but when I build it in Android it doesnt work. It is as if the scriptableObjects weren't assigned, or are just null.
Also, debugging it in android I get warnings like:

  • Script attached to 'CubeSampleDialogTriggerEvent' in scene '' is missing or no valid script is attached. (this is a scriptableGameEvent object)
  • The referenced script on this Behaviour (Game Object '') is missing!

I tested it building the sample project in android an it worked there, so could it be a problem with my Unity set up?
The implementation is for an VRDaydream game. Any ideas?

#ifdef UNITY_EDITOR on serialized property

Hi,
I really like the idea of using scriptable objects as variables. Adding a description is really usefull, specially in bigger projects.

#if UNITY_EDITOR
[Multiline]
public string DeveloperDescription = "";
#endif

Unfortunatly, it seems that this is not possible anymore to keep the description as an editor definition in Unity 2019.1. It generates a crash at runtime with the following message :

Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

Wouldn't source control be spammed with unnecessary changes caused by persistant scriptable assets being modified at run time?

You mention briefly in the question section of your talk that there is code in your framework to revert these values to their original state. You mention that the PlayerHealth gets "reset to the default value on Start". If you mean that the SimpleHealth script literally sets PlayerHealth.value = MaxHealth.value in Start, that means the PlayerHealth asset would remain modified when you stop running your game.

You would end up with potentially tens or hundreds of scriptable assets being modified (depending on the scale of your project), and you'd have to discard these changes every time in your source control before committing your work. That sounds like a nightmare!

Im really interested in this workflow, hence all the questions. Looking forward to your replies :)

Add a license

Could you please add a license file to the repository so people can tell under what terms the code can be used? The MIT license would be a nice choice, if possible. Thanks!

Persistence (saving data)

Maybe your inventory example would've shed some light on this. How does data remain persistant? (IE player Inventory)

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.