28 lines
885 B
C#
28 lines
885 B
C#
|
|
/*WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW*\ ( ( ) )
|
|
|/ \| ) ) _((_
|
|
|| (c) Wanzyee Studio < wanzyeestudio.blogspot.com > || ( ( |_ _ |=n
|
|
|\ /| _____)) | ! ] U
|
|
\.ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ./ (_(__(S) |___*/
|
|
|
|
using UnityEngine;
|
|
|
|
namespace WanzyeeStudio.Json{
|
|
|
|
/// <summary>
|
|
/// Custom <c>Newtonsoft.Json.JsonConverter</c> for <c>UnityEngine.Rect</c>.
|
|
/// </summary>
|
|
public class RectConverter : PartialConverter<Rect>{
|
|
|
|
/// <summary>
|
|
/// Get the property names include <c>x</c>, <c>y</c>, <c>width</c>, <c>height</c>.
|
|
/// </summary>
|
|
/// <returns>The property names.</returns>
|
|
protected override string[] GetPropertyNames(){
|
|
return new []{"x", "y", "width", "height"};
|
|
}
|
|
|
|
}
|
|
|
|
}
|