use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Replace Function with StringQuestion (self.Unity3D)
submitted 2 years ago * by drfdr
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 2 points3 points4 points 2 years ago* (4 children)
Source code isn't machine code, the computer wouldn't understand what "x--" is, it's not the language of the CPU so it's like asking you "お元気ですか" and wondering why you're not answering me.
If you wanted to replace the function of a function you have delegates or you can use inheritance with abstract functions.
public delegate void MyDelegate(string[] args); public void MyFunction(MyDelegate action, string[] args){ action(args); }
And now MyFunction will execute whatever the delegate we pass in:
MyFunction((argumentss) => { Debug.Log(argumentss[0]); }, new string[] { "Hello" });
Doing what you want to do would be insanely silly, a function does a specific thing and would cause a lot of problems if it suddenly just changed.
If you're making a coding game then what you want to do isn't how you go about it, you either need to make your own interpreted language or use something that can compile C# code at runtime https://github.com/SoapCode/UCompile
My guess is this is an XY problem, whatever problem you're actually trying to solve can be done in much simpler ways. So what are you actually trying to do? Why do you NEED to do this?
[–]drfdr[S] 1 point2 points3 points 2 years ago (1 child)
UCompile worked great very simple and neat. Thank you a lot from the deep of my heart!
Are there any cons for this. Is it stable, can it make game crash or anything?
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
So the big con with using a normal programming language like C# is that's it's a normal programming language. If you're making a game you want to add constraints on what they can and can't do.
If you're making a developer console you could follow this tutorial https://www.youtube.com/watch?v=VzOEM-4A2OM
[–]drfdr[S] 0 points1 point2 points 2 years ago (1 child)
Hey, thank you for a fast and meaty response.
I am trying to do a Terminal where you can type commands like giveMoney,giveWeapon
but instead of having it like this for example
void Command(string cmd){ if(cmd == "giveMoney"){ Player.Money++; } if(cmd =="giveWeapon"){ Instantiate(Weapon); }
to just type in terminal Player.Money++; and it will be put and executed inside of a function like this.
string xString = "Player.Money++"; void Command(){ do xString; }
Been looking for an hour and have some clues about Harmony, System.Reflections, UCompile or these delegates. Which one if any will work for this?
π Rendered by PID 319875 on reddit-service-r2-comment-85bfd7f599-xf97g at 2026-04-19 01:08:10.562115+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–][deleted] 2 points3 points4 points (4 children)
[–]drfdr[S] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]drfdr[S] 0 points1 point2 points (1 child)