Тёмный

How to make NATIVE PLUGINS in Unity using RUST 

Ryan Hedgecock
Подписаться 1,5 тыс.
Просмотров 4,8 тыс.
50% 1

In this video, I teach you how to develop your own NATIVE PLUGINS for the Unity Engine by using the power of the Rust Programming Language.
Sometimes when doing game development there are critical paths that need to be sped up by native code. Writing that code in any C language is hard and boring. RUST has the tools to make native libraries that we can leverage in the Unity Engine to make some really powerful and blazingly fast code.
Rust Native Package: github.com/rhe...
Blog / Text Version: blog.hedgecock...
Interoptopus: docs.rs/intero...
#UnityEngine #RustProgramming #GameDevelopment #NativePlugins #UnityDevelopment #RustLang #CodeOptimization #BlazinglyFast #GameProgramming #NativeCode #ProgrammingTutorial #GameDevTips #UnityTips #RustLibrary #GamePerformance

Опубликовано:

 

12 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 39   
@jkRatbird
@jkRatbird Год назад
Your editing is amazing, 3.50 got me so pumped up!
@rhedgeco
@rhedgeco Год назад
Thanks! It was fun to record for sure.
@Sugarloaf_Games
@Sugarloaf_Games Год назад
The jazz at 0:20 cracks me up. Love your video style, keep it up. And heck, may need to try Rust out now.
@rhedgeco
@rhedgeco Год назад
ONE OF US! ONE OF US! ONE OF US! In all seriousness, I appreciate your comment! Thanks for watching!
@TotallyNotInspired
@TotallyNotInspired 5 месяцев назад
You will definitely blow up, love your video
@LuisCassih
@LuisCassih Год назад
Love your style! I would like to see some examples of real usage for rust code in Unity, as you can't access Unity components or call something outside Rust, right? So, what's your usage for this? Doing calculations, physics, parsing data or things like that? So, if it's possible, in a future video do a really small game, with a few assets and simulating a real development. Idk, a simply platformer. That way we can see the amount of work on unity that's needed to work along side Rust. I also love to integrate Rust in all my projects ^^, I'm even doing native plugins that I'm using in NodeJS for a webserver at my work. Anyways, great video! I hope to see more of you in the future :)
@rhedgeco
@rhedgeco Год назад
Thanks for the kind words and the suggestion! That's a good idea, will certainly consider doing a video like that soon! You're right that you would not be able to access unity components from rust. At least not easily that is. My use case is for really heavy calculations in critical paths. I'll try to make an example soon!
@kalvinpearce
@kalvinpearce Год назад
Very underrated and entertaining video! As both a seasoned Unity & Rust dev seperately, I am very curious what kinds of things you use/would use this for? Does this allow you to make use of any crates on the rust end?
@rhedgeco
@rhedgeco Год назад
Great question! Yeah once you cross the FFI boundary, you can take full advantage of all rust has to offer! Easy multi threading using rayon and whatever other library you want to use. It's fantastic! Thanks for the comment 😁
@kalvinpearce
@kalvinpearce Год назад
@@rhedgeco 👀 full advantage of rust you say? This sounds like a dangerous tangent to get lost in and I'm all for it. Thanks for showing it off! Keen to see what you put out next
@Albileon
@Albileon 9 месяцев назад
Apparently I'm your 1000th subscriber, congrats on the milestone of 1k subs! Great videos
@rhedgeco
@rhedgeco 9 месяцев назад
Holy smokes that was fast! Thank you so much for your support! I better step up my game and get my next video out soon so you all have some new content 😅
@neko-lover3242
@neko-lover3242 2 месяца назад
You are insane!
@frederickdalley7871
@frederickdalley7871 Год назад
yes, Officer, a bag of orange powder. No, Officer, it's not mine - a deranged internet man forced it into my hand and told me to thank him later, before disappearing into the hedgerow
@7thdim
@7thdim Год назад
Your video was very entertaining, you really did a great job in the middle. 😁
@rhedgeco
@rhedgeco Год назад
Thanks! It was a lot of fun to make
@thaiduynguyen6469
@thaiduynguyen6469 Год назад
Good jobs my friend. New start on your github project.
@siamandshahadmira-1041
@siamandshahadmira-1041 Год назад
i love the video style ! this can help me creating arduino simulator ? where user write C code and get translated to c# ?
@rhedgeco
@rhedgeco Год назад
It would take some work, but it's certainly possible.
@siamandshahadmira-1041
@siamandshahadmira-1041 Год назад
@@rhedgeco do u suggest a logic i can follow to make such system ?
@rhedgeco
@rhedgeco Год назад
@@siamandshahadmira-1041 There are a few rust libraries for compiling C code at runtime. If I understand correctly you should take a look into those and see if they work for you.
@coolkattcoder
@coolkattcoder Год назад
how does this compare to building using il2cpp instead of mono? Would you notice any major performance gain? What about when compared to burst compiled functions? Awesome video!
@rhedgeco
@rhedgeco Год назад
Thanks for the comment! It really depends on the use case and how you are doing it. There is a slight overhead to using FFI functions so the more processing that can be done on either side before crossing the language barrier the better. That said I've done previous videos using the burst compiler and they are fairly comparable. I personally like rust because of the easier multithreading which usually speeds things up. Both I've found are faster than using il2cpp for what its worth, but again it has its use cases.
@coolkattcoder
@coolkattcoder Год назад
@@rhedgeco Awesome thanks for the info!
@badjano
@badjano 2 месяца назад
unsure what are the benfits, I usually create DLLs with Rider and C#
@anphanuc2542
@anphanuc2542 8 месяцев назад
I need help with java native plugin ;((
@ulrich-tonmoy
@ulrich-tonmoy Год назад
is it possible to do with zig
@rhedgeco
@rhedgeco Год назад
I have never used zig at length but as far as I understand, zig can make libraries that are c-style so you can make libraries that are compatible the same way that rust is.
@stephenmcconnell7868
@stephenmcconnell7868 3 месяца назад
I am on a Mac. How do I do this without C#?
@rhedgeco
@rhedgeco 3 месяца назад
This is a unity engine tutorial. Unity engine and C# work on Mac computers. There should be no problems related to operating systems
@computdroid3736
@computdroid3736 Год назад
is it working cross platform?
@rhedgeco
@rhedgeco Год назад
This should absolutely work cross platform. I have not tested on Mac however so there should be some changes to the code to get it working there
@Brainboostnetwork
@Brainboostnetwork Год назад
hey hows the procedural music going?
@rhedgeco
@rhedgeco Год назад
Thanks for the comment! My next video will be diving back into that since people seemed to love it so much
@darcking99
@darcking99 10 месяцев назад
? What's the purpose of this?
@pepinzachary
@pepinzachary 9 месяцев назад
This is hilarious lmao
@rhedgeco
@rhedgeco 9 месяцев назад
Glad you liked it 😁
@pepinzachary
@pepinzachary 9 месяцев назад
@@rhedgeco What are your plans with boba? :)
@rhedgeco
@rhedgeco 9 месяцев назад
@@pepinzachary It's been a huge testing ground for me. Ultimately my goal is to make games in my own engine, instead of relying on unity.
Далее
Making Procedural Music in Unity
10:39
Просмотров 30 тыс.
Game Engine Of The Future
9:12
Просмотров 145 тыс.
Как подписать? 😂 #shorts
00:10
Просмотров 620 тыс.
To mahh too🫰🍅 #abirzkitchen #tomato
01:00
Просмотров 4,4 млн
I Entered a Game Jam with NO Experience
8:36
Просмотров 1,2 тыс.
Linus Torvalds on why desktop Linux sucks
11:07
Просмотров 1,3 млн
10 Must-Have Unity Assets for Game Developers
6:11
Просмотров 45 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 711 тыс.
Harder Drive: Hard drives we didn't want or need
36:47
Watch This Before Working on a Big Game in Unity
18:44
Просмотров 296 тыс.
Как подписать? 😂 #shorts
00:10
Просмотров 620 тыс.