naphier / unity-design-patterns Goto Github PK
View Code? Open in Web Editor NEWExamples of programming design patterns in Unity C#
License: Creative Commons Zero v1.0 Universal
Examples of programming design patterns in Unity C#
License: Creative Commons Zero v1.0 Universal
@dmattson
Feel free to discuss anything over here. I had some other discussion threads, but they were old and those folks just made suggestions and didn't seem to want to contribute.
Thanks for joining in!
Right,
The Issue I mentioned before is that I think the concepts you have at present outlines the patterns as you understand them now, not in a way that facilitates someone who doesn't have the level of knowledge you do.
people have a problem grasping design patterns because of:
so in the interest of hitting all of those pain points the trick is to walk them through it.
so i propose a folder structure under each pattern as:
This stucture shows the equivalent of
'hello world' for each pattern,
shows the native unity alternative to make it easier to see that you are doing,
shows a functional feature sans-pattern to give them some grounding and a relatable setting,
'updates' the code to show what refactoring-to-patterns looks like.
then, as they are now no doubt asking themselves, 'great i now know HOW to apply it but not WHY',
you propose a problem and show how the pattern made it easier.
finally you give them a 'continue on from here' in both styles so they can follow along trying it both ways and getting a feel for why the pattern is an improvement.
Maybe a dumb question, but why is Command an abstract class and not an interface?
http://wiki.c2.com/?AreDesignPatternsMissingLanguageFeatures
C# is a fairly dynamic language - as far as static languages go... I just wanted to put it out there that some of the Gang of Four patterns might map directly on to language features.
I haven't looked through this repo yet and I'm far from being either a C# expert or a Design Pattern expert but I thought it might be an interesting idea to throw into the mix.
Hi.
I have made a Singleton pattern implementation at https://github.com/UnityCommunity/UnitySingleton.
It also includes the Preload scene implementation.
You can add the Singleton.cs script or you can add a link to it in your readme.
Hope this helps.
Thanks.
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.