MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SaveJsonAsset

Method SaveJsonAsset

Source/Editor/Editor.cs:978–984  ·  view source on GitHub ↗

Serializes the given object to json asset. The result asset file path. The obj to serialize. True if saving failed, otherwise false.

(string outputPath, object obj)

Source from the content-addressed store, hash-verified

976 /// <param name="obj">The obj to serialize.</param>
977 /// <returns>True if saving failed, otherwise false.</returns>
978 public static bool SaveJsonAsset(string outputPath, object obj)
979 {
980 if (obj == null)
981 throw new ArgumentNullException();
982 string str = JsonSerializer.Serialize(obj);
983 return Internal_SaveJsonAsset(outputPath, str, obj.GetType().FullName);
984 }
985
986 /// <summary>
987 /// Cooks the mesh collision data and saves it to the asset using <see cref="CollisionData"/> format. action cannot be performed on a main thread.

Callers 8

SaveAssetMethod · 0.80
SaveMethod · 0.80
SetCustomSettingsMethod · 0.80
SaveMethod · 0.80
CreateMethod · 0.80
CreateMethod · 0.80
CreateMethod · 0.80
SaveMethod · 0.80

Calls 2

SerializeMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected