- I want to use Stan's Asset for android gallery
- I put uGUI button and attach OnClick
public void OnClickOpenGallery() { AN_MediaPicker picker = new AN_MediaPicker(AN_MediaType.Image); /// Defines if multiple images picker is allowed. /// The default falue is < c > false </ c > picker.AllowMultiSelect = false; /// Max thumbnail size that will be trsnafered to the Unity side. /// The thumbnail will be resized before it sent. /// The default falue is 512. picker.MaxSize = 1; /// Starts pick mdeia from a gallery flow. picker.Show((result) => { PrintPickerResult(result); }); }
- result.Media[0].Thumbnail.width = 1 ... why?
Resolved
- I looked at sample
[SerializeField] Button m_getPictures; void Awake() { m_getPictures.onClick.AddListener(() => { AN_MediaPicker picker = new AN_MediaPicker(AN_MediaType.Image); /// Defines if multiple images picker is allowed. /// The default falue is < c > false </ c > picker.AllowMultiSelect = true; /// Max thumbnail size that will be trsnafered to the Unity side. /// The thumbnail will be resized before it sent. /// The default falue is 512. picker.MaxSize = 512; /// Starts pick mdeia from a gallery flow. picker.Show((result) => { PrintPickerResult(result); }); }); }
- It works!
- There is difference between "Delegate?" and "uGUI OnClick"
- Follow sample
uGUIではじめるUnity UIデザインの教科書-Unity5対応
- 作者: 岩井雅幸,丸山弘詩
- 出版社/メーカー: マイナビ出版
- 発売日: 2015/09/01
- メディア: 単行本(ソフトカバー)
- この商品を含むブログ (1件) を見る