<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sanukin39</author_name>
  <author_url>https://blog.hatena.ne.jp/sanukin39/</author_url>
  <blog_title>スマゲ</blog_title>
  <blog_url>https://smartgames.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Unityでboolean(真偽値)を保存してみる■動機 UnityはPlayerPrefsを利用することで、int, float, stringの値を保存できるが、bool値は保存できない。 そのため、intやstringの値を保存するときと同様にbool値を保存するにはどのようにすれば良いか考えてみた。■実装 まずintの1をtrue、0をfalseとして定義する。 PlayerPrefsのSetInt、GetIntを利用しながら、それらと同様のインターフェースでbool値を保存できるメソッドを作成する using UnityEngine; public static class Save…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsmartgames.hatenablog.com%2Fentry%2F2016%2F08%2F22%2F010140&quot; title=&quot;Unityのplayerprefsでbool(真偽値)を保存する - スマゲ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/sanukin39/20160822/20160822005253.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-08-22 01:01:40</published>
  <title>Unityのplayerprefsでbool(真偽値)を保存する</title>
  <type>rich</type>
  <url>https://smartgames.hatenablog.com/entry/2016/08/22/010140</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
