Second commit

This commit is contained in:
ThomasCharester committed 2026-09-20 15:26:03 +03:00
commit 36840f3ad4
999 files changed
+61364

No files matched your search

@@ -0,0 +1,31 @@
//
// This file is part of the Tremble package by Tiny Goose.
// Copyright (c) 2024-2026 TinyGoose Ltd., All Rights Reserved.
//
using UnityEditor.AssetImporters;
using UnityEngine;
using System.IO;
namespace TinyGoose.Tremble.Editor
{
[ScriptedImporter(1, "fgd", -1000)]
public class FgdFileAssetImporter : ScriptedImporter
{
[SerializeField] private bool m_Test;
// -----------------------------------------------------------------------------------------------------------------------------
// Entry Point
// -----------------------------------------------------------------------------------------------------------------------------
public override void OnImportAsset(AssetImportContext ctx)
{
string assetName = Path.GetFileNameWithoutExtension(ctx.assetPath);
FgdFileAsset wadAsset = ScriptableObject.CreateInstance<FgdFileAsset>();
wadAsset.name = assetName;
ctx.AddObjectToAsset(assetName, wadAsset);
ctx.SetMainObject(wadAsset);
}
}
}