Unity game security

I’ve recently been learning how to prevent or secure my Unity game from being extracted. I used AssetRipper to extract someone else’s game and found a script that appears to hide all the code.

The extracted script looks like this:

  using UnityEngine;
  public class ABC : MonoBehaviour
  {

Dummy class. This could have happened for several reasons:

1. No dll files were provided to AssetRipper.

    Unity asset bundles and serialized files do not contain script information to decompile.
        * For Mono games, that information is contained in .NET dll files.
        * For Il2Cpp games, that information is contained in compiled C++ assemblies and the global metadata.
        
    AssetRipper usually expects games to conform to a normal file structure for Unity games of that platform.
    A unexpected file structure could cause AssetRipper to not find the required files.

2. Incorrect dll files were provided to AssetRipper.

    Any of the following could cause this:
        * Il2CppInterop assemblies
        * Deobfuscated assemblies
        * Older assemblies (compared to when the bundle was built)
        * Newer assemblies (compared to when the bundle was built)

    Note: Although assembly publicizing is bad, it alone cannot cause empty scripts. See: https://github.com/AssetRipper/AssetRipper/issues/653

3. Assembly Reconstruction has not been implemented.

    Asset bundles contain a small amount of information about the script content.
    This information can be used to recover the serializable fields of a script.

    See: https://github.com/AssetRipper/AssetRipper/issues/655

4. This script is unnecessary.

    If this script has no asset or script references, it can be deleted.
    Be sure to resolve any compile errors before deleting because they can hide references.

5. Script Content Level 0

    AssetRipper was set to not load any script information.

6. Cpp2IL failed to decompile Il2Cpp data

    If this happened, there will be errors in the AssetRipper.log indicating that it happened.
    This is an upstream problem, and the AssetRipper developer has very little control over it.
    Please post a GitHub issue at: https://github.com/SamboyCoding/Cpp2IL/issues

7. An incorrect path was provided to AssetRipper.

    This is characterized by "Mixed game structure has been found at" in the AssetRipper.log file.
    AssetRipper expects games to conform to a normal file structure for Unity games of that platform.
    An unexpected file structure could cause AssetRipper to not find the required files for script decompilation.
    Generally, AssetRipper expects users to provide the root folder of the game. For example:
        * Windows: the folder containing the game's .exe file
        * Mac: the .app file/folder
        * Linux: the folder containing the game's executable file
        * Android: the apk file
        * iOS: the ipa file
        * Switch: the folder containing exefs and romfs

*/
} 

Could someone help me understand how to protect my game from this kind of extraction?
Thanks

Code Protection:

If there are blocks in your code that you do not want to be read or manipulated, you can use IL2CPP backend. However, remember that IL2CPP never provides complete protection. Methods can still be manipulated or called manually. Of course, this will not be as easy as Mono.

A much more useful way would be to encrypt the code. You can use any Obfuscator available on the Asset Store.

Asset Store search: https://assetstore.unity.com/search#q=obfuscator

But remember, no way can prevent your game’s codes from being manipulated and replayed. For now…

Asset Protection (3D Models, Animations Etc.):

From the Unity Website: “An AssetBundle is an archive file that contains platform-specific non-code Assets (such as Models, Textures, Prefabs, Audio clips, and even entire Scenes) that Unity can load at run time.”

AssetBundles allow Unity assets (such as 3D models, animations, textures) to be stored as a standalone package and later included in the game.

If there are assets in your game that you are afraid of being extracted, you can put them in a bundle and download them from a server after the game is installed.
But remember, if someone reaches your AssetBundle, they can extract it too.

Even if they do not reach any of them, those who are interested in this work can use rippers such as DXRipper, rippers that use DirectX or OpenGL APIs to export your entire scene.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật