Search code examples
c#unity-game-engineassets

Is there way to read unity assets MonoBehaviour.txt file?


I'm extract unity assets from unity asset bundle file, But I can't find way to read those files use programs.

MonoBehaviour Base
    UInt8 m_Enabled = 1
    PPtr<MonoScript> m_Script
        int m_FileID = 0
        SInt64 m_PathID = -6465759843790442317
    string m_Name = "QuestTbl"
    QuestTblData tableDataList
        Array Array
        int size = 2
            [0]
            QuestTblData data
                int group_id = 150001
                int quest_id = 0
                int quest_type = 1
                int local_id = 15000100
                string quest_start_day = "2019-01-14"
                string quest_end_day = "2019-01-21"
                int category = 10
                string condition_type = "DUNGEON_CLEAR"
                int condition_id = 0
                int condition_value = 5
                int reward_type = 1
                int reward_id = 110364
                int reward_count = 1
            [1]
            QuestTblData data
                int group_id = 150002
                int quest_id = 0
                int quest_type = 1
                int local_id = 15000200
                string quest_start_day = "2019-01-14"
                string quest_end_day = "2019-01-21"
                int category = 10
                string condition_type = "DUNGEON_CLEAR"
                int condition_id = 0
                int condition_value = 10
                int reward_type = 1
                int reward_id = 110364
                int reward_count = 1

How can I read this file and convert to some class? Any language all right.


Solution

  • No

    Script files can only be in asset bundles by reference (GUID). The compiled class code must exist in the base project in order for the script to actually be attached when the asset is deserialized, otherwise you'll end up with a MissingScriptException.