How to create DLL for Unity with Visual Studio

  Рет қаралды 31,297

Code to Create

Code to Create

Күн бұрын

Пікірлер: 38
@TheSpacecraftX
@TheSpacecraftX 3 жыл бұрын
Remember to switch to Release mode instead of Debug mode to get faster running code without the debug feature flags turned on.
@sandraeise9080
@sandraeise9080 3 ай бұрын
Thank you sooo much !!!! Your example worked perfectly ! Directly afterwards i tried a transform.Translate for a cube, same way as you have explained and it also worked without problems !!!
@CodetoCreate
@CodetoCreate 3 ай бұрын
Glad it helped!
@zenxah_2514
@zenxah_2514 2 жыл бұрын
My entire assignment has been explained in 7 minutes
@Demix224
@Demix224 3 жыл бұрын
oh thank you this was exactly what I was looking for.
@007walk
@007walk 2 жыл бұрын
Thanks for this quick run through for creating a dll.
@DavTheCanadian
@DavTheCanadian 2 жыл бұрын
Thank you so very much Macy, that's exactly what i was looking for !
@sadafshabbir165
@sadafshabbir165 3 жыл бұрын
thank you soooo much. *code to create*.. now Ill do code easily
@johnmoore5309
@johnmoore5309 2 жыл бұрын
Very helpful and straightforward. Thank you!
@C.F_Studio
@C.F_Studio Жыл бұрын
thanks for the info Macy :D
@unityvictor787
@unityvictor787 2 жыл бұрын
Thanks for the tutorial, it's very easy to understand.
@dreamisover9813
@dreamisover9813 Жыл бұрын
Thanks, really useful!
@phyzxengrmoore6928
@phyzxengrmoore6928 3 жыл бұрын
Thank you. This is very clear. The further question I have is can I use calls from an EditorWindow class DLL to call methods in a Monobehaviour class dll with the correct assembly references added?
@sampalacio
@sampalacio Жыл бұрын
Great! What would be a good use case for this?
@CodetoCreate
@CodetoCreate Жыл бұрын
Sharing your code with others
@murat303
@murat303 4 жыл бұрын
thanks, can u make a video about how to obfuscate dlls?
@MineGugi
@MineGugi 3 жыл бұрын
My visual studio 2017 is not finding reference of Monobehaviour after add UnityEngine.dll reference and add 'using UnityEngine;'
@tzebruh
@tzebruh 3 жыл бұрын
You have to add UnityEngine.CoreModule.dll for that to work.
@rickyreddy5894
@rickyreddy5894 4 жыл бұрын
Awesome. Thanks for sharing
@unityvictor787
@unityvictor787 2 жыл бұрын
But I found out the comment I wrote in Visual Studio, It won't show up in the script opened with Visual Studio in Unity. How to make it show up?
@toptunesiran
@toptunesiran 2 жыл бұрын
Hi, Thank you for the tutorial. I have a question, will this plugin work on android or ios?
@CodetoCreate
@CodetoCreate 2 жыл бұрын
Dll is windows format. It only works on Windows.
@RagnarLothbrok-bk7zi
@RagnarLothbrok-bk7zi Жыл бұрын
yo can you help me with my project please? whenever I import my C# script it shows me error that system.data.sqlclient namespace not recognised
@lucasaraujo3722
@lucasaraujo3722 3 жыл бұрын
thank you! ( Você é muito linda!)
@VirtualSUN
@VirtualSUN 2 жыл бұрын
Thank you very much!
@westparezal
@westparezal 3 жыл бұрын
How can i get dll class methods from another class in unity?
@unityhub-d8g
@unityhub-d8g Жыл бұрын
Good Work
@CodetoCreate
@CodetoCreate Жыл бұрын
Thanks!
@monsunstudio3871
@monsunstudio3871 2 жыл бұрын
unity.visual scripting.antlr3.runtime.dll was not found Whats should be i do?
@autorotate1803
@autorotate1803 2 жыл бұрын
Thank you!!
@foly9032
@foly9032 3 жыл бұрын
can i use some dll without monobehavior?
@CodetoCreate
@CodetoCreate 3 жыл бұрын
Yes
@jeb9472
@jeb9472 3 ай бұрын
thank you
@HericksonWargames
@HericksonWargames 2 жыл бұрын
Thanks!
@troyna77
@troyna77 2 жыл бұрын
ty
@GameDevNerd
@GameDevNerd 2 жыл бұрын
"MonoBehaviour is the most used class in Unity projects," -- Yep, it sure is ... and it's also the most widely _abused_ class in the entire Unity API, and one of the primary reasons people complain about getting only 18 to 32fps frame rates in their games! Only thing people might abuse worse than MonoBehaviour is probably those _evil_ coroutines ... 😬 When I talk to beginners or look at junior devs' work, I tend to notice that they are usually blissfully unaware that _constructors_ are a thing or how to write plain ol' basic C# classes and use them. They create MonoBehaviour after MonoBehaviour for every little snippet of code they want to write, and turn their projects into a spaghetti-coded swampland no one can navigate that performs unbelievably slow for the simplicity of their scenes and their games. And to make it worse, they will have crazy coroutines going all over the place for absolutely no reason. No one ever explains to them that MonoBehaviour is a very special and _expensive_ class we _only_ use under very special circumstances, and that _most_ game logic belongs in ordinary classes we write and design ourselves ... or that coroutines are _not_ threads, they are _not_ asynchronous and they are _not_ faster (they're actually slower), and they also have a _very_ specific, special purpose. What are those purposes? To oversimplify things and make a long story short, MonoBehaviour is only necessary when you _must_ glue some code to a GameObject _directly_ and have its state serialized in the editor. Don't confuse that with seeing things in the editor inspector window, even though that's a _benefit_ of it, because you can see regular classes and structs in the inspector too, if you mark them [Serializable] and use them as a field in a MonoBehaviour or ScriptableObject that's editor-serialized. Simply mark the field [SerializeField] but do _not_ make public fields ... that's another terrible, awful thing beginners are being incorrectly taught to do. Public fields are the Devil in a big project ... you may not notice while you're working at very small scales on short-term scenes, but one day you'll find out the hard way when scripts are changing stuff, screwing up the whole game and you can't get a debugger breakpoint to hit for anything modifying the variable! What is the special purpose of a coroutine? A coroutine is made for splitting up a long or slow process and doing work over multiple frames without _blocking_ the game loop. Like if you need to fetch some data from the web or iterate over 2-million items in a huge array. If you tried to just do it all on one update, the game will freeze until its done. Coroutines are for letting it do a _little slice_ of that work each frame. It's _not_ for trying to speed your game up, make a delay or count-down (that's _not_ what WaitForSeconds is for lol) and it's not asynchronous or a thread whatsoever.
@Justinjaro
@Justinjaro Жыл бұрын
idk who you're working with or how bad they code, but dude, if public methods/fields and such are changing in your game and you can't track them down, I really don't think it's the fault of using "public", it seems like poor coding to me. Yeah it may be bad practice to have everything in classes be public, but in the end it's still up to the developers to close/track down anything utilizing that public class/field/method. There's more than one way to cook an egg, and if someone ships a game/experience that doesn't break with they shipped a game that doesn't break. But to add on to your MonoBehaviour point, yeah that Update method is crazy abused. Telling juniors to just code with callbacks and events instead of using the Update method is a real hard one for people to get used to. No need to check every frame if a thread is still processing/grabbing data.
@GameDevNerd
@GameDevNerd Жыл бұрын
@Justinjaro someone in our Discord had precisely that problem with a boolean value in a script ... it kept ending up unexpectedly *false* when they set it to true, and it was a naked public field. A completely different system was setting it false without them realizing it, which was written before they even started working there. But he changed it to a property and found out the cause by using a breakpoint ... if he'd used a property in the first place he wouldn't have been pulling his hair out his head and wasting 2 days fighting it and writing hundreds of Debug.Log calls all over the class. Using properties and following good practices are essentially "free" (doesn't hurt anything, and carries no extra effort or difficulty) and give you a way to instantly get yourself out of such trouble when trouble comes. In the real world you're gonna be working with a lot of bad programmers and bad code other people wrote, teaching junior devs and trying to simplify complex things. So you might as well think ahead and make good choices your default.
Что такое Assembly Definition в Unity и зачем он нужен?
12:45
Лавка Разработчика
Рет қаралды 6 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
How to make NATIVE PLUGINS in Unity using RUST
6:33
Ryan Hedgecock
Рет қаралды 6 М.
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 133 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 7 МЛН
How To PLAN your Game as a Solo Developer
16:26
Heartbeast
Рет қаралды 539 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 578 М.
11 Things You (Probably) Didn't Know You Could Do In Unity
13:49
Game Dev Guide
Рет қаралды 159 М.
Events & Delegates in Unity
13:20
Game Dev Beginner
Рет қаралды 67 М.
How to use Addressables FASTER Loading FREE Memory SMALL Download
27:46
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН