Skip to content

Instantly share code, notes, and snippets.

@fum1h1ro
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fum1h1ro/ceaadfb7bbea0e540a2e to your computer and use it in GitHub Desktop.
Save fum1h1ro/ceaadfb7bbea0e540a2e to your computer and use it in GitHub Desktop.
LWFの最もシンプルと思われるサンプルをBooで書くとこうなる……
import UnityEngine
class TestLWF (LWFObject):
def Start ():
set_loader()
Load(
'lwfdata/character', 'lwfdata/', '', 0.0f, 1.0f, 0, null as Camera, null as Camera, true, true,
null as System.Func[of LWF.Data, bool],
null as System.Action[of LWFObject],
null as System.Action[of LWFObject],
null as System.Func[of string, (byte)],
null as System.Func[of string, Texture2D],
null as System.Action[of Texture2D])
def set_loader():
lwflo = def(name):
asset = Resources.Load(name) as TextAsset
if asset == null:
return null
return asset.bytes
tex = def(name):
texture = Resources.Load(name) as Texture2D
if texture == null:
return null
return texture
LWFObject.SetLoader(lwflo as System.Func[of string, (byte)], tex as System.Func[of string, UnityEngine.Texture2D], null)
@fum1h1ro
Copy link
Author

Update()が定義されていると、LWFObjectを阻害する

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment