UnrealSharp
  • Home
  • FAQ
  • Getting Started
    • Setup
    • Your First Script
    • Debugging
    • Packaging
  • Documentation
    • Classes
      • Properties
        • C++ Functions As C# Properties
        • C++ Properties with Getters/Setters
      • Functions
        • Flags
        • MetaData
      • Default Actor Components
      • Helper Methods
    • Structs
    • Enums
    • Interfaces
    • Delegates
    • Collections
      • TArray
      • TNativeArray
      • TSet
      • TMap
    • Multiplayer
      • Replicated Properties
      • RPCs (Remote Procedure Calls)
      • Replicated UObjects
    • Primary Data Assets
      • Loading Primary Data Assets
    • Loading Soft References
    • Trace Channels
    • Static Variables
      • FWorldStaticVar<T>
      • FGameStaticVar<T>
    • Logging
    • Async
    • Gameplay Tags
      • Gameplay Tag Container
    • Extension / Mixin Methods
    • Subsystems
    • Module Lifecycle
  • Links
    • Github Repository
    • Roadmap
    • Discord
Powered by GitBook
On this page
  1. Documentation

Primary Data Assets

You can create a UPrimaryDataAsset in C# using UCSPrimaryDataAsset.

[UClass]
public class UItemPrimaryDataAsset : UCSPrimaryDataAsset
{
    public UItemPrimaryDataAsset()
    {
        AssetName = "Item";
    }
    
    [UProperty(PropertyFlags.EditDefaultsOnly)]
    public FText ItemName { get; set; }
}

AssetName needs to match up with the type assigned in AssetManagersettings in your project settings.

PreviousReplicated UObjectsNextLoading Primary Data Assets

Last updated 7 months ago