Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 25th Aug 2022 at 11:25 PM
Default MethodName?.Invoke(); and replacing game scripts
I've been working with Unity while I've been away, and I have two questions to ask based on something I've learned.

1) I learned that using ?.Invoke(); serves as a prebuilt null check. I'm wondering if anyone's gotten this method to work with The Sims 3?

2) Is it possible to replace the game's scripts with our own edited ones? Or are we confined to making our own scripts?
Advertisement
Space Pony
#2 Old 26th Aug 2022 at 12:50 AM
Quote: Originally posted by YolkSims
1) I learned that using ?.Invoke(); serves as a prebuilt null check. I'm wondering if anyone's gotten this method to work with The Sims 3?


If you're referring to the Null-conditional Operators (?. and ?[]), those are C# features, not Unity features. So yes, they will work as long as your IDE/compiler supports C# 6.

Quote: Originally posted by YolkSims
2) Is it possible to replace the game's scripts with our own edited ones? Or are we confined to making our own scripts?


With some caveats, yes. They're called core mods, and you generally can't use more than one at a time unless they modify different assemblies.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Test Subject
Original Poster
#3 Old 26th Aug 2022 at 5:40 PM
Quote: Originally posted by gamefreak130
With some caveats, yes. They're called core mods, and you generally can't use more than one at a time unless they modify different assemblies.


That's... rather unfortunate. But, logically, it makes sense.

Thank you.
Back to top