Created
March 4, 2026 22:51
-
-
Save w0wca7a/a0dbc02c5b2a182dc7898207f3b4b24b to your computer and use it in GitHub Desktop.
Model modifiers for Model Asset in Stride Game Engine editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using MySpace; | |
| using Stride.Assets.Models; | |
| using Stride.Core; | |
| using Stride.Core.BuildEngine; | |
| using Stride.Core.Diagnostics; | |
| using Stride.Rendering; | |
| //namespace andryuha; | |
| [DataContract("AdditionalModifier")] | |
| public class AdditionalModifier : IModelModifier | |
| { | |
| public const string Name = "AdditionalModifier"; | |
| [DataMember] | |
| public int Version => 1; | |
| public void Apply(ICommandContext commandContext, Model model) | |
| { | |
| var logger = commandContext.Logger; | |
| var logMessage = new LogMessage() { Module = "AdditionalModifier", Text = "SomeText", Type = LogMessageType.Info }; | |
| logger.Messages.Add(logMessage); | |
| commandContext.RegisterCommandLog(logger.Messages); | |
| model.GetFirstModelMesh(); | |
| commandContext.Logger.Info("AdditionalModifier has been applied. First mesh: " + model.GetFirstModelMesh() + " of model "); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment