示例#1
0
        private static void RegenerateInterop()
        {
            int count = 0;

            var self = new BurstInteropCodeGenerator();

            foreach (var ty in TypeCache.GetTypesWithAttribute <GenerateBurstMonoInteropAttribute>())
            {
                count += self.RegenerateInteropForType(ty);
            }

            if (count > 0)
            {
                AssetDatabase.Refresh();
            }
        }
        private static void RegenerateInterop()
        {
            bool clickedOk = EditorUtility.DisplayDialog("Burst Interop", "Burst interop cannot be generated correctly if you have compile errors. If there are compile errors, please cancel and fix before proceeding.", "Generate", "Cancel");

            if (!clickedOk)
            {
                return;
            }

            int count = 0;

            var self = new BurstInteropCodeGenerator();

            foreach (var ty in TypeCache.GetTypesWithAttribute <GenerateBurstMonoInteropAttribute>())
            {
                count += self.RegenerateInteropForType(ty);
            }

            if (count > 0)
            {
                AssetDatabase.Refresh();
            }
        }