forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSerialization.cs
More file actions
49 lines (43 loc) · 1.57 KB
/
Copy pathSerialization.cs
File metadata and controls
49 lines (43 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using scm = System.ComponentModel;
using uei = UnityEngine.Internal;
using RequiredByNativeCodeAttribute = UnityEngine.Scripting.RequiredByNativeCodeAttribute;
using UsedByNativeCodeAttribute = UnityEngine.Scripting.UsedByNativeCodeAttribute;
using System;
namespace UnityEngine
{
[RequiredByNativeCode]
public sealed partial class SerializeField : Attribute
{
}
/// <summary>
/// What is this : Instruct the Unity serialization backend to serialize field as a reference type, as opposed to SerializeField
/// that serializes the data in place (as if it where a Value type).
/// Motivation(s):
/// - Polymorphic serialization of plain old C# classes.
/// - Representing graph like structures without having to resort to ScriptableObjects.
/// - Express null fields.
/// </summary>
[RequiredByNativeCode]
[AttributeUsage(AttributeTargets.Field)]
public sealed partial class SerializeReference : Attribute
{
[UnityEngine.Internal.ExcludeFromDocs]
public SerializeReference() {}
}
[RequiredByNativeCode]
[AttributeUsage(AttributeTargets.Class)]
public sealed class PreferBinarySerialization : Attribute
{
}
[RequiredByNativeCode]
public interface ISerializationCallbackReceiver
{
[RequiredByNativeCode]
void OnBeforeSerialize();
[RequiredByNativeCode]
void OnAfterDeserialize();
}
}