Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Could need an advice

Discussion in 'General Discussion' started by Ardenian, Mar 9, 2018.

  1. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    Hello,
    I could need an advice from you guys regarding game development and working with Unity, if you don't mind to comment, I appreciate if you could take a minute.

    I myself study computer science and got to know C# and some of its features. Every now and then, I get in the mood to create a small project, a small game in Unity. I learned the hard way that bigger projects are likely doomed to fail when you are a one-man-project and right now, I like to tinker around with small ideas.

    There is, however, one thing, which pushes me away from Unity, despite me seeing Unity as pretty much the only option when it comes to game development with C# and shaping my ideas to reality. Don't get me wrong, I do not wish this thread to become a "hate thread" about Unity, "Unity bashing" or something in that direction. I wish to receive opinions and to get some advice on how I myself can deal with the problem which I face regarding Unity. I do apologize in advance for any of my text which might be offensive or inappropriate, I try to get to the point what bothers me personally right now.

    Every time I start a new project, everything appears fine. I setup my project, make myself a little overview, set goals and then get started. Soon after, the first class is done, relations to new classes are made and the project starts to get shape.
    However, soon, after some days, the problems are starting to pour in. Wishing to show something in the Inspector, but not allowing to edit it, so I import ReadOnlyPropertyAttribute from somewhere around Github. Works great, however, I can still edit the size of lists while not being able to edit their elements. Starting to search how to manually draw lists in the property drawer of the ReadOnlyAttribute which would allow me to hide the size property field. Giving up after I can barely find something and my own ideas are not successful.

    To get to the core of my problem, I keep running into walls, having to find dirty, unusual workarounds to my ideas to work in Unity. This could be the all-time favourite of serializing generics, interacting with interfaces or even just drawing a specific type, like all List<T> with [ReadOnlyPoperty] attribute without its size property. I keep hitting these issues where I am unable to provide a clean solution for myself and I am not quite sure that the reason for that are my skills. I mean, yes, of course they are part of the problem, since someone with certain skills could surely find a clean solution, however, I am far away from being an expert with C#, though I dare to say I know one or another thing. Still, I am unable to solve problems which appear simple from the outside.

    After being there again and again, I started realizing that usually all these problems are related to either Unity's serialization or something with the inspector. Therefore, I started looking for assets which replace these Unity features and while I did find assets which seem to solve my problems, they are expensive from my point of view. I cannot, no, I refuse to pay like 100 dollars for one single asset which replaces core features of Unity. Why doesn't Unity provide these, so people with programming experience are able to use the Unity Engine with C# features as they are meant to be used, as example Generics. Seeing a new input system is on the way, my heart cheers and I hope they will take on the serialization next, so we can finally write serializable Generics without having to workaround, to mention one point.

    To get to the bottom of my question, how can I deal with these situations and what is your experience regarding this? Studying computer science, I know that there are always problems everywhere, but I feel as if I run into problems which the framework should had taken care of. It destroys my motivation and distracts me from my original project, having to find solutions which are then not guaranteed to be maintained or working properly.
     
  2. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    You are focusing more on your experience of the editor than on actually making the game.
    Instead of trying to add features to Unity's inspector try to avoid scripts that need missing features.
    This has been a problem forever and I doubt things will change any time soon.

    Note: Trump supporters don't get many replies, stop building walls of text.
    If you can't explain your point in a single paragraph you're never going to get twitter followers.
     
    EternalAmbiguity likes this.
  3. dterbeest

    dterbeest

    Joined:
    Mar 23, 2012
    Posts:
    389
    It sounds to me like you are over engineering things. If you are working on a project alone, why does it matter what you can and cannot do in the inspector. Just throw an error of some kind when the amount of items in a list are bigger or smaller then you expect them to be.
     
    EternalAmbiguity likes this.
  4. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    Thank you for your comment, that's an interesting point of view and it makes me thinking about how I approach working with Unity.

    Maybe my problem is that I look at working with Unity from the C# mind and perspective, however, needing a Unity mind ( which is actually dangerous, once the component pattern consumed you there is no going back). I think I try your suggestion and reduce my work on whatever Unity actually supports.

    I don't think I understand your intention of this part of your comment.
     
    zoran404 likes this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,091
    Truthfully the entire post reads as nothing more than an excuse. There are legitimate limitations to the inspector and there are situations that a read only attribute could be very beneficial for a team where you don't want people making changes to the field but for an individual it's a silly requirement.

    Realistically if you're making excuses this early I can't help but feel like you'd continue making them even if you found the perfect solution for the inspector (which is likely Odin Inspector by the way for $45).

    My recommendation is to try learning to live with the problems you're encountering because you will always find new ones.
     
    theANMATOR2b and aer0ace like this.
  6. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    Yes, this might be true. I usually try to create an environment allowing me to have a good work flow and sometimes that's where I get stuck.

    Well, about the inspector features, I create objects which may not be edited afterwards, but I still would like to view its values ( yes, I know about Debug inspector in Playmode). Maybe it is an enhancement which I do not actually need. Thank you, I will try to keep my enhancement greed low, so I can focus on my actual project.
     
  7. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    Thank you, you actually hit a point here, my intention about that feature was indeed what you describe, despite me being a one-man worker right now. Your comment helped me, I wasn't aware of my way of thinking about this, thinking about how it would be to not work alone and what I would have to consider then. I think if I can overcome this behaviour I receive a great boost in speed and focus. Surely applies to protection level decisions of my classes as well, I desperatly try to make them not public if they are not supposed to be edited and got some strange results.
     
    theANMATOR2b likes this.
  8. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    @zoran404 : What exactly does his question have to do with Trump? Or Trump Supporters?
    Why must somebody always have to bring Trump into everything. This forum is supposed to be free of politics.

    You don't know who supports who in here, and one of these days, the person you mistakenly talked bad about, will be the one person who could really get you out there into the world to running a billion dollar company. (Or whatever your goals are).

    Point being, don't burn down your bridges in terms of connections, simply because of an opinion nobody asked for or cares about. Let people support who they want to support and lets all just get along.

    Now can we please keep politics out of Unity forums?


    Anyways, now to the OP:
    @Ardenian Honestly mate, you're just overthinking things that can be done without doing so much fancy stuff.
    Don't start doing the fancy things until you know the in's and outs of 'this' engine specifically.
    You can also try other engines and see if they are more able to work around with what you understand now.

    But with anything else in life, don't expect to just jump in doing Skynet AI from the start of learning. Learn the Engine,
    you can actually learn quite a bit in just a couple weeks, enough to go out and make entire games. But yeah, avoid advanced stuff until you're ready... Honestly though, there's no shame in admitting you're not ready. Admitting to it is a sign of strength and character, I'd rather talk to someone who admits they don't know something rather than lying and saying they do.
     
    theANMATOR2b likes this.
  9. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I have to agree that all of this has practically nothing to do with actually building games. If you're the only guy working on this and you aren't making asset store stuff, what does it matter if you can edit something in the inspector? How will that affect your game, or project or whatever? Focus on what you're trying to create in the scene and worry about that stuff only if you're making something extensible.
     
  10. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    Thanks for your comment!

    I tried to express in my inital post that I worked as well with Unity and C# before, but I am far away from being an expert, there are always many things to learn and I do dare to say that I know what I am capable of and when I have to learn something new. I would not describe myself as such arrogant in terms of having to learn something new and overestimating my own skills.
    Right now, as example, I rip apart the Procedural Dungeon asset presented by Unity, so I can easily extend the presented content and add new algorithmus to generate new kinds of structures, like those examples. I have enough experience to not run into problems when executing this idea.

    Learning the engine, that's where the problems start, I agree with you. Calculating rectangles when creating a property drawer? No idea about that. What to do when I want a certain type, like List<T>, be drawn in a certain way? Neither. Why drawing an attribute of a class property allows to disable it in the inspector? Neither.

    There are tons of tutorials out there which explain many many things, be it to get to know the engine or to learn how to develop something for your game. When am I ready to get started with the engine? I believe that you would agree with me that it is not possible to learn an engine of Unity's size before starting a game, there is simply to much content. So when I run into something which I cannot execute, I look it up. I should use these forums more often, when running into problems which I cannot solve by myself and research.

    Therefore, I don't know whether I am ready or not. I feel as if I know enough to create a small (!), simple (!) game with Unity. I know the MVC model, I got to know different interesting design patterns which I would like to use in Unity, however, often it seems as if I cannot apply the pattern because Unity doesn't allow a staight implementation due to serialization or other reasons. So what shall I do, when I do know what to do, but not being able to do that in Unity?

    Here also comes into the topic what @EternalAmbiguity said, thank you for your comment as well.
    Let's take protection level into consideration. In the tutorial which I linked and follow above, because I don't know how to work with vertices and triangles yet, they just slam public everywhere. That's not what a good design should look like, is it? Regardless whether I am working alone or in a team. This one can easily be solved by using internal and namespaces ( praising Java for packages here), but I would like to know what Unity expects me to do here.

    Should I ignore what I learned about protection level and accessibility, should I straightforwad focus on my class, ignoring every other object can access the ones with public accessibility, should I forget about clean modell and design solutions?
    [/user]
     
  11. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I noticed you mentioned Serialization, I've never used Unity's serialization so I can't say. I created my own from scratch, can save / load entire games, (even randomly generated scenes), etc. Without ever writing a line of code to any of my existing scripts.

    But honestly man, I still think you're letting it all over-complicate this more than it really is.
    In fact, perhaps you should start off with small games.

    Sometimes I take breaks from big projects, just to work on smaller games, so I keep my brain in tract with creativity, not pressure of wondering why something isn't working.

    The funny part is, it's when I take them breaks, I come back to my big project and the answer to the problem I was having was staring me right in the face the entire time. All because I over-complicated a situation more than it needed to be.
     
  12. Ardenian

    Ardenian

    Joined:
    Dec 7, 2016
    Posts:
    313
    @N1warhead Thank you for coming back to me, I will follow your advices and take some steps back. Eventually, I will learn a lot of the related topics, like serialization, in my course of study so I should be able to deal with those issues then by myself and not running into walls.
     
    N1warhead likes this.
  13. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    My joke was bad, I'll admit that. I meant to compare this guy building walls of text with trump building a wall.
    Anyway I don't have any interest in american politics and I'm sorry if my jokes bother anyone.
     
    theANMATOR2b likes this.
  14. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You're never going to complete a game if you're spending all your time in your "tinker around with small ideas" projects trying to do things like restrict yourself from editing inspector fields. This should only be a concern for massive projects being put together by a large team, to try to keep everyone on the same page, and those type of projects can afford the $100 to add in that feature.

    Stop getting distracted from making your game with your fixation on inspector perfection. The inspector is just a tool, and it is not necessarily a bad thing that it is possible to misuse a tool. Just don't misuse it, and go back to working on your project. If you do misuse it, either fix it or roll back the change with your version control.

    You're doing the equivalent of deciding to build an outdoor deck, but get stuck because it is still possible to hit your thumb with your hammer. Instead of just being careful not to hit your thumb you're instead focused on building a thumb safe hammer. Just build your deck and try your best not to hit your thumb. Even if you do hit your thumb, you'll be fine.